Skip to content

Patch/queue job ids

Robert Sinton requested to merge patch/queue_job_ids into master

What I did

  • Moved the setting of the queue class's internal queue and job id variables to earlier in the job-processing loop, so that the correct values are ready for use by the log function.
  • Tweak to notification message for jobs that have reached their retry limit.

Implications

Prior to this change, the "Start Processing" message in the queue_log table would show the wrong id in the job_id column: it would show NULL for the first job being processed, and if there were other jobs in a group it would show the id of the previous job each time:

Screen_Shot_2018-06-27_at_5.26.33_PM

Setup

Queue up some jobs for processing (or set some old ones back to waiting.)

How to test

  • Code review.
  • Consider the logic of this change, and any potential side effects.
  • Process some jobs and confirm that the "Start Processing" records show the correct ids.

Merge request reports