Use statuses instead of "is_active"
Need to switch to use statuses instead of the is_active boolean.
Since callbacks are generally run via crontab there has been some reports longer running tasks are lasting past the cronjob period. ie, every 5 minutes the run_callbacks command is issued. When a task takes longer than the 5 minute period, it's re-run as it has yet to be deactivated. This creates an ugly domino effect.
We can use simple statuses to avoid this. Proposed statuses are.
- active - Waiting to be processed
- pending - In process queue, waiting to actually start processing
- processing - Actually in process
- complete - Successfully completed
- failed - Processing failed.
The manager will need updating for the global features. The management command will need to update all currently gathered active callbacks to pending. The callback_manager will need to set a callback to processing once processing starts. The mark_success and mark_error model helper methods will need to be updated.
Last, we'll also need some south migrations for the new status field, but also a data migration to migrate any callbacks in the database to the new format. Not pretty, but necessary.