Solved

Apps9: How can i make a custom API call go through a specific batch queue?

  • 28 May 2021
  • 4 replies
  • 183 views

Userlevel 6
Badge +11

We have a slow running overnight job - Calculate Customer Credit which runs on default queue - ‘0’.

 

This is taking a long time to run, so would like to move a custom job which keeps stalling behind this queue to a faster queue.


Does anyone know the line of code i need to specifiy the batch queue the custom job will run on?

icon

Best answer by Tomas Ruderfelt 28 May 2021, 11:12

View original

This topic has been closed for comments

4 replies

Userlevel 7
Badge +19

I guess you already know that you can specify which queue a function should execute in by adding the function from the background job under the batch queue?

 

If that was not what you meant and if you are coding and you create the background job manually, you can specify a hardcoded batch queue in the method Transaction_SYS.Deferred_Call

 

Userlevel 6
Badge +11

Thank you for both answers - i didn tknow i could add the function manually in batch queue configuration so thats appreciated!

Userlevel 7
Badge +19

If I may suggest another thing.

If you have a slow running job in the default queue it might be a good thing to create a separate queue for that one and move it there. if you do that you are  sure that no other jobs in the default queue will  have to wait for the slow one.

Userlevel 7
Badge +18

When you refresh the dictionary cache and run the job once, it’ll be put into the Default Queue. You can move it from the Default Queue to a different queue by dragging it with your mouse.