wiki.techinc.nl/maintenance/archives/patch-job_attempts.sql
Aaron Schulz cd000590ee [JobQueue] Added support for retrying jobs when runners die.
* This adds a new 'claimTTL' setting which recycles jobs into the queue
  if they have been claimed for longer than that duration (in seconds).
* This also purges jobs for such cases when job retries are not enabled.
* This adds a new job_attempts column and adds an index to improve the
  query and semantics for FIFO ordered queues.

Change-Id: Idb6217a694d86a4d6fc881768deed424628f015d
2012-11-14 01:25:03 +00:00

4 lines
162 B
SQL

ALTER TABLE /*_*/job
ADD COLUMN job_attempts integer unsigned NOT NULL default 0;
CREATE INDEX /*i*/job_cmd_token_id ON /*_*/job (job_cmd,job_token,job_id);