From 66364207f4da62f6de063c70f95f28186973f6c9 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 19 Jun 2019 23:54:12 +0100 Subject: [PATCH] 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. --- guix-data-service/jobs/load-new-guix-revision.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm index a79d02a..479de33 100644 --- a/guix-data-service/jobs/load-new-guix-revision.scm +++ b/guix-data-service/jobs/load-new-guix-revision.scm @@ -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