Process jobs starting with the most recent

Conventionally, you'd process the oldest job in a queue, but at the moment, it
would be more useful to have recent information more promptly, and fill in the
historical gaps later. I'm not sure this'll always be the case, but for now,
flip the order in which jobs are processed.
This commit is contained in:
Christopher Baines 2019-06-19 23:54:12 +01:00
parent ea80311c49
commit 66364207f4

View file

@ -519,7 +519,7 @@ ORDER BY load_new_guix_revision_jobs.id DESC")
"FROM load_new_guix_revision_job_events "
;; Skip jobs that have failed, to avoid trying them over and over again
"WHERE job_id = load_new_guix_revision_jobs.id AND event = 'failure'"
") ORDER BY id ASC LIMIT 1")))
") ORDER BY id DESC LIMIT 1")))
(define (record-job-event conn job-id event)
(exec-query