Purge Failed Work Items batch process
|
Code |
|
|
Categories |
|
|
Implementation |
Batch process |
|
Stoppable |
No (single phase process) |
|
Schedule |
On the first day of the month, at 1:00 a.m. |
|
Class |
PurgeFailedWorkItems.gs |
The Purge Failed Work Items batch process purges failed work items from all existing work queues. This process uses Gosu class PurgeFailedWorkItems to determine which work items to delete. The doWork method of the PurgeFailedWorkItems class iterates across all work queues and deletes failed work items as it finds them.
During a scheduled execution of the batch process, the process deletes failed work items that are older than the last run date of the batch process. It then sets the last run date to the current date. Thus, if the scheduled execution of this batch process is monthly, the process deletes work items that are older than a month only.
If you run this process manually and there are work items that are newer than the last run date, the batch process does not delete them. If you then run the batch process a second time on the same day, the process deletes work items that are older than the current date. This is the expected behavior.
See also
