guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: database: Optimize db-clear-build-queue.


From: Mathieu Othacehe
Subject: branch master updated: database: Optimize db-clear-build-queue.
Date: Tue, 14 Dec 2021 07:19:55 -0500

This is an automated email from the git hooks/post-receive script.

mothacehe pushed a commit to branch master
in repository guix-cuirass.

The following commit(s) were added to refs/heads/master by this push:
     new 7160b18  database: Optimize db-clear-build-queue.
7160b18 is described below

commit 7160b182a0d4c9aa71460ad9c4d866b440027bbd
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Tue Dec 14 13:19:11 2021 +0100

    database: Optimize db-clear-build-queue.
    
    * src/cuirass/database.scm (db-clear-build-queue): Ignore builds that are
    already scheduled.
---
 src/cuirass/database.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm
index ae5cd8e..bd5a6e6 100644
--- a/src/cuirass/database.scm
+++ b/src/cuirass/database.scm
@@ -1881,7 +1881,8 @@ WHERE status = -1 AND
 (define (db-clear-build-queue)
   "Reset the status of builds in the database that are marked as \"started\"."
   (with-db-worker-thread db
-    (exec-query db "UPDATE Builds SET status = -2 WHERE status < 0;")))
+    (exec-query db "UPDATE Builds SET status = -2
+WHERE status != -2 AND status < 0;")))
 
 (define (db-get-log-from-output output)
   "Return the log file corresponding to the OUTPUT build."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]