I want to create an external service using Orchestrator’s API call requests in order to stop some running jobs to prioritize other processes.
This idea is the only solution that I’ve found for the following problem:
Having 5 production licenses busy to process a bunch of queue items of a process (let’s call it A), at some point, new items have to be processed for another process (B) with a higher priority than A. The problem is that until that bunch (maybe 1000) items aren’t processed from A, no other job will stop to process that items from B.
So, these being said, now I’m thinking how to integrate some API calls (available in Swagger) in order to loop through my queues, get the number of unprocessed items, then get their priority, compare it with the one of processes in running and if their priority is higher than those, stop that jobs and start the ones with higher priority.
Maybe I could create a collection of requests in Postman and run it continuously but I don’t know to implement that IFs (priority comparison).
I thought of suggesting jobs priority but for ur use case you can focus primarily on queue priorities rather than job priorities, as queue priorities directly impact the order in which items are processed
U can try something like set up an external service or even another simple bot that periodically checks the status of queue items in Orchestrator using the Orchestrator API and for each queue, fetch details of unprocessed items, including their priority. You can use the
/odata/QueueItems endpoint with filters to get relevant items.
On this …
From the list obtained determine which items need higher priority processing and use the same bot with Orchestrator API to stop or terminate running jobs that correspond to queue items that should be deprioritized in favor of higher-priority items.
Rest of the steps u had were good to complete this
Hope this helps
Reference document for api from postman with all entities url
Thank you for your reply!
I can’t use a separate license in order to have a bot that continuously checks the others’ states as I don’t have enough licenses to allocate one to this specific task.
So the approach related to a Postman external service is the only available. How to configure it?
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.