How to purge specific entries in BatchQueue


#1

One of my COE colleagues has asked me to find and purge her jobs / entries from the BatchQueue.

In JMSqueue, I can always issue:
JMS.purgeQueue(‘subQueueName’) , especially if I can see one level below the main queue,

BUT
1 . how do I find what is actually pending in the BatchQueue?
2 . and then how do I purge the right entry?

Right now, the only tool I know is BatchQueue.clear(), (sledgehammer approach) but this will clear the entire queue


#2

BatchQueue.clear() takes in an InvalidationQueueFilterSpec as an input parameter. c3ShowType(InvalidationQueueFilterSpec) will show you the options available to filter on.

c3QReport(BatchQueue, true) will show you a list of entries in the queue by job instance.

from there, you’ll be able to create your call to clear the entries you’d like. It’ll look something like this:

BatchQueue.clear({field1: [values], field2: value, etc.})

#3

When I try JmsDataLoadQueue.clear(), only failed/error entries get cleared, but pending entries remain. Can I get rid of them somehow?


#4

Dod you try JmsDataLoadQueue.clearEntries() or Jms.purge(‘JmsDataLodQueue’)?


#5

Thanks, but neither

JmsDataLoadQueue.clearEntries()
nor
JMS.purgeQueue('JmsDataLoadQueue')

works (on 7.8.4.3-1).


#6

As for JMS.purgeQueue, I need to call it on elements of JMS.listQueues().


#7

@FerencM I think the best practice would be to identify the BatchJob of interest (FileSystemBatchJob, RefreshCalcFieldsBatchJob, etc.) and cancel the job. This removes the pending entries from the queue and updates the status of the job appropriately. Clearing the queue of the specific entries works as well but it will also clear computing entries without actually killing them. Queues will look empty but the actions will still be computing in the cluster and can only be identified using Cluster.actionDump() or BatchQueue.computingActions().