Skip to main content
Solved

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


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

 

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

4 replies

Forum|alt.badge.img+19
  • Superhero (Employee)
  • 488 replies
  • 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)
  • 125 replies
  • 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+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.


durette
Superhero (Customer)
Forum|alt.badge.img+19
  • Superhero (Customer)
  • 525 replies
  • 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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings