guix-commits
[Top][All Lists]
Advanced

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

03/06: Only query recent pending builds


From: Christopher Baines
Subject: 03/06: Only query recent pending builds
Date: Sun, 1 Nov 2020 17:53:32 -0500 (EST)

cbaines pushed a commit to branch master
in repository data-service.

commit adc1d01525b0f96c3c9ada1a33654beaa971aafd
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Sun Nov 1 21:53:19 2020 +0000

    Only query recent pending builds
    
    To avoid old pending builds that never leave the scheduled/started state.
---
 guix-data-service/builds.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/guix-data-service/builds.scm b/guix-data-service/builds.scm
index 41473fc..68f4a6b 100644
--- a/guix-data-service/builds.scm
+++ b/guix-data-service/builds.scm
@@ -501,7 +501,8 @@ LEFT JOIN latest_build_status
 WHERE builds.build_server_id = $1 AND
       latest_build_status.status IN (
         'scheduled', 'started'
-      )
+      ) AND
+      latest_build_status.timestamp > (current_date - interval '28' day)
 ORDER BY latest_build_status.status DESC, -- 'started' first
          latest_build_status.timestamp ASC
 LIMIT 10000")



reply via email to

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