rackerlabs/qonos — pull request #311 by venkateshsampath (2014-06-06 06:58:20+00:00)
Title: introduce new job state, HARD_TIMED_OUT.

Currently, when a job hard times out, we do not update the status to denote that the job has failed and hence there is no way to send a job.failed notification for hard timed out jobs.
With this patch we introduce a new job state (HARD_TIMED_OUT) and based on this new job state a job.failed notification is sent for the hardtimed out jobs.
Implementation Details:
- introduce a new job state - HARD_TIMED_OUT
- remove the filter for ignoring the hard_timed_out jobs from db call, _job_get_next_by_action
- instead update query criteria to ignore jobs whose status is already set to 'HARD_TIMED_OUT'
- implement calls for updating and sending job.failed notification in JobProcessor
- include tests for the changes done.