diff options
-rw-r--r-- | guix-qa-frontpage/server.scm | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/guix-qa-frontpage/server.scm b/guix-qa-frontpage/server.scm index 32c812c..e15bd90 100644 --- a/guix-qa-frontpage/server.scm +++ b/guix-qa-frontpage/server.scm @@ -449,6 +449,8 @@ port. Also, the port used can be changed by passing the --port option.\n" database #:key (number-of-series-to-refresh 250)) + (define frequency + (* 10 60)) (define (refresh-data) (simple-format (current-error-port) @@ -458,7 +460,7 @@ port. Also, the port used can be changed by passing the --port option.\n" database 'latest-patchwork-series-by-issue latest-patchwork-series-by-issue - #:ttl 0)) + #:ttl (/ frequency 2))) (series-to-refresh (if (> (length latest-series) number-of-series-to-refresh) @@ -510,7 +512,7 @@ port. Also, the port used can be changed by passing the --port option.\n" (list (patch-series-derivation-changes-url base-and-target-refs #:systems %systems-to-submit-builds-for)) - #:ttl (* 60 20))))) + #:ttl (/ frequency 2))))) #:unwind? #t))) (and derivation-changes @@ -528,9 +530,6 @@ port. Also, the port used can be changed by passing the --port option.\n" (call-with-new-thread (lambda () - (define frequency - (* 10 60)) - (while #t (let ((start-time (current-time))) (with-exception-handler @@ -557,6 +556,9 @@ port. Also, the port used can be changed by passing the --port option.\n" (- frequency time-taken))))))))) (define (start-refresh-non-patch-branches-data-thread database) + (define frequency + (* 30 60)) + (define (refresh-data) (simple-format (current-error-port) "refreshing non-patch branches data...\n") @@ -606,16 +608,13 @@ port. Also, the port used can be changed by passing the --port option.\n" branch-derivation-changes #:args (list derivation-changes-url) - #:ttl 0))) + #:ttl (/ frequency 2)))) #:unwind? #t))) #f))) branches))) (call-with-new-thread (lambda () - (define frequency - (* 30 60)) - (while #t (let ((start-time (current-time))) (with-exception-handler |