CpanelInc/cPanel-TaskQueue — pull request #4 by gwadej (2014-10-16 17:26:37+00:00)
Title: Add support for flushing and deleting tasks.

Clean up critic issues and fix optional serial param.
Add support for flush_all_tasks and delete_all_tasks to scheduler.
Add support for deleting tasks from the queues to taskqueue.
Update the Changes file.
Update version number in dist.ini.
Drop the ability to do Module::Build in dist.ini.
Add taskqueuectl support for flushing scheduled tasks.
Add taskqueuectl support for deleting unprocessed tasks.
Update tests to match new code.
On any tests that were changed replace hokey exception testing with
Test::Exception calls.
On any tests that were changed replace ad hoc temporary file logic with
File::Temp logic.

Based on the discussion with Todd and Brian regarding the problems with testing and the TaskQueue, we need a way to clean the TaskQueue. I have provided two approaches, flushing scheduled tasks into the waiting queue so that they can be processed, and deleting all tasks that are not currently being processed. We had decided on the first. But, we had discussed both. I implemented both approaches in order to avoid re-releasing code if we determined the first approach is not enough.