diff options
author | Christopher Baines <mail@cbaines.net> | 2023-11-06 17:17:12 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-11-06 17:24:50 +0000 |
commit | 3eb7ca766219c58ef5fa82fdf9f2d8dded91dcdd (patch) | |
tree | 1d7322e39094ee8349b22ebefe849faa97239233 /guix-qa-frontpage | |
parent | 0961fc48d451afaf066d1ad3367138669e5291aa (diff) | |
download | qa-frontpage-3eb7ca766219c58ef5fa82fdf9f2d8dded91dcdd.tar qa-frontpage-3eb7ca766219c58ef5fa82fdf9f2d8dded91dcdd.tar.gz |
Tweak error handling around talking to Mumi
I think requests to Mumi were being responded to with 502's, and that led QA
to delete all the patch branches. This should hopefully stop that happening in
the future.
Diffstat (limited to 'guix-qa-frontpage')
-rw-r--r-- | guix-qa-frontpage/mumi.scm | 67 | ||||
-rw-r--r-- | guix-qa-frontpage/patchwork.scm | 13 |
2 files changed, 40 insertions, 40 deletions
diff --git a/guix-qa-frontpage/mumi.scm b/guix-qa-frontpage/mumi.scm index 82b64b5..540f909 100644 --- a/guix-qa-frontpage/mumi.scm +++ b/guix-qa-frontpage/mumi.scm @@ -97,43 +97,38 @@ #:verify-certificate? #t))) (if (null? chunks) (close-port port) - (begin - (with-exception-handler - (lambda (exn) #f) - (lambda () - (let ((response - (retry-on-error - (lambda () - (graphql-http-get* - url - `(document - ,@(map (lambda (number) - `(query (#(issue #:number ,number) - number title open severity tags - (merged_with number)))) - (car chunks))) - #:keep-alive? #t - #:port port)) - #:times 1 - #:delay 0))) + (let ((response + (retry-on-error + (lambda () + (graphql-http-get* + url + `(document + ,@(map (lambda (number) + `(query (#(issue #:number ,number) + number title open severity tags + (merged_with number)))) + (car chunks))) + #:keep-alive? #t + #:port port)) + #:times 1 + #:delay 0))) - (for-each - (lambda (res) - (let ((data (cdr res))) - (hash-set! number-to-data - (assoc-ref data "number") - `((title . ,(assoc-ref data "title")) - (open? . ,(assoc-ref data "open")) - (tags . ,(vector->list - (assoc-ref data "tags"))) - (merged-with . ,(map - (lambda (data) - (assoc-ref data "number")) - (vector->list - (assoc-ref data "merged_with")))) - (severity . ,(assoc-ref data "severity")))))) - response))) - #:unwind? #t) + (for-each + (lambda (res) + (let ((data (cdr res))) + (hash-set! number-to-data + (assoc-ref data "number") + `((title . ,(assoc-ref data "title")) + (open? . ,(assoc-ref data "open")) + (tags . ,(vector->list + (assoc-ref data "tags"))) + (merged-with . ,(map + (lambda (data) + (assoc-ref data "number")) + (vector->list + (assoc-ref data "merged_with")))) + (severity . ,(assoc-ref data "severity")))))) + response) (loop (cdr chunks) port)))) diff --git a/guix-qa-frontpage/patchwork.scm b/guix-qa-frontpage/patchwork.scm index 04a15e6..afcc47c 100644 --- a/guix-qa-frontpage/patchwork.scm +++ b/guix-qa-frontpage/patchwork.scm @@ -192,10 +192,15 @@ batch-hash-table)) (mumi-data - (call-with-delay-logging mumi-bulk-issues - #:args - (list - (map first series-by-issue-number))))) + (retry-on-error + (lambda () + (call-with-delay-logging mumi-bulk-issues + #:args + (list + (map first series-by-issue-number)))) + #:times 1 + #:delay 5))) + (loop next-page-uri (fold |