Removing jobs from queues

#1

How do I remove a certain type of job from a queue, or at least reprioritize the jobs within a queue (vs prioritizing queues)

0 Likes

#2

Get a lay of the land with this command: c3QReport(MapReduceQueue, true) —can be done for any queue.

To set prioritization: MapReduceQueue.setPriority({targetTypeId: ‘135’}, 200)
(see the documentation for this function for other options)

OR

To change a status of a type of job entry in a queue:
TargetType.status(‘TargetObjId’) . (fetches the current status)

example: JSMapReduceJob.status(‘d75155e0-1d02-4964-8fb0-7e433b1e4afc’)

and then execute the cancel(‘TargetObjId’) or disable(‘TargetObjId’) to either cancel or disable all the entries from that job in the queue. Disabled jobs can be re-enabled with enable(‘TargetObjId’)

With Prioritization, you must be careful, because prioritization will only effect the entries currently in the queue. If you set the prioritization while a job is initializing, then the subsequent entries will enter the queue with the default priority, and their prioritization will need to be set independently with a separate execution of the setPriority() command.

1 Like