Skip to main content
Solved

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

  • May 28, 2021
  • 4 replies
  • 230 views

Forum|alt.badge.img+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?

Best answer by Tomas Ruderfelt

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

 

This topic has been closed for replies.

4 replies

Forum|alt.badge.img+21
  • Superhero (Employee)
  • Answer
  • May 28, 2021

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

 


Forum|alt.badge.img+11
  • Author
  • Sidekick (Customer)
  • May 28, 2021

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


Forum|alt.badge.img+21

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.


durette
Superhero (Customer)
Forum|alt.badge.img+19
  • Superhero (Customer)
  • May 28, 2021

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.