diff options
author | Christopher Baines <mail@cbaines.net> | 2023-04-20 10:54:02 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-04-20 10:54:02 +0100 |
commit | d4a381650b792d2185f551a53d9f2debae824d99 (patch) | |
tree | adb58f170e812a82aa0c799380cc9a4220f46cd9 /guix-qa-frontpage | |
parent | 25eff460e838b22ddf8b51c96036e0dc141e8b98 (diff) | |
download | qa-frontpage-d4a381650b792d2185f551a53d9f2debae824d99.tar qa-frontpage-d4a381650b792d2185f551a53d9f2debae824d99.tar.gz |
Make some tweaks around refreshing patches data
Diffstat (limited to 'guix-qa-frontpage')
-rw-r--r-- | guix-qa-frontpage/mumi.scm | 20 | ||||
-rw-r--r-- | guix-qa-frontpage/patchwork.scm | 7 | ||||
-rw-r--r-- | guix-qa-frontpage/server.scm | 2 |
3 files changed, 19 insertions, 10 deletions
diff --git a/guix-qa-frontpage/mumi.scm b/guix-qa-frontpage/mumi.scm index bef358d..375fa6b 100644 --- a/guix-qa-frontpage/mumi.scm +++ b/guix-qa-frontpage/mumi.scm @@ -21,6 +21,8 @@ #:use-module (ice-9 match) #:use-module (kolam http) #:use-module ((guix-data-service utils) #:select (chunk-for-each!)) + #:use-module ((guix-build-coordinator utils) + #:select (retry-on-error)) #:export (mumi-issue-tags mumi-issue-open? @@ -57,13 +59,17 @@ (chunk-for-each! (lambda (chunk) (let ((response - (graphql-http-get - "https://issues.guix.gnu.org/graphql" - `(document - ,@(map (lambda (number) - `(query (#(issue #:number ,number) - number title open severity tags))) - chunk))))) + (retry-on-error + (lambda () + (graphql-http-get + "https://issues.guix.gnu.org/graphql" + `(document + ,@(map (lambda (number) + `(query (#(issue #:number ,number) + number title open severity tags))) + chunk)))) + #:times 3 + #:delay 0))) (for-each (lambda (res) diff --git a/guix-qa-frontpage/patchwork.scm b/guix-qa-frontpage/patchwork.scm index 6bfa372..ee43b5b 100644 --- a/guix-qa-frontpage/patchwork.scm +++ b/guix-qa-frontpage/patchwork.scm @@ -150,8 +150,11 @@ (patchwork-patches #:patchwork patchwork)) (let* ((data (hash-map->list cons result)) - (mumi-data (mumi-bulk-issues - (map first data)))) + (mumi-data + (call-with-delay-logging mumi-bulk-issues + #:args + (list + (map first data))))) (sort! (filter-map (lambda (data mumi) (if (assq-ref mumi 'open?) diff --git a/guix-qa-frontpage/server.scm b/guix-qa-frontpage/server.scm index b14b106..d983205 100644 --- a/guix-qa-frontpage/server.scm +++ b/guix-qa-frontpage/server.scm @@ -516,7 +516,7 @@ port. Also, the port used can be changed by passing the --port option.\n" (define (refresh-data) (simple-format (current-error-port) - "refreshing data...\n") + "refreshing patch branches data...\n") (let* ((latest-series (with-sqlite-cache database |