aboutsummaryrefslogtreecommitdiff
path: root/guix-qa-frontpage/server.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2022-11-16 09:33:46 +0000
committerChristopher Baines <mail@cbaines.net>2022-11-16 09:33:46 +0000
commite2f97d1d6312ca60f2a1e2c932a0a6b30af794f8 (patch)
tree18d98d293b442885c8dd1b87b441152b6dd2cd15 /guix-qa-frontpage/server.scm
parentf30cf3a9fdab216c9fe0d74625e717663ab59205 (diff)
downloadqa-frontpage-e2f97d1d6312ca60f2a1e2c932a0a6b30af794f8.tar
qa-frontpage-e2f97d1d6312ca60f2a1e2c932a0a6b30af794f8.tar.gz
Handle not being able to fetch derivation changes when refreshing data
Diffstat (limited to 'guix-qa-frontpage/server.scm')
-rw-r--r--guix-qa-frontpage/server.scm47
1 files changed, 29 insertions, 18 deletions
diff --git a/guix-qa-frontpage/server.scm b/guix-qa-frontpage/server.scm
index bf8c00a..d648de4 100644
--- a/guix-qa-frontpage/server.scm
+++ b/guix-qa-frontpage/server.scm
@@ -404,24 +404,35 @@ port. Also, the port used can be changed by passing the --port option.\n"
(if (> index 300)
#f
(let ((derivation-changes
- (and=>
- (patch-series-derivation-changes-url
- (with-sqlite-cache
- database
- 'patchwork-patch-checks
- patchwork-patch-checks
- #:args (list
- (assoc-ref (first (assoc-ref series "patches"))
- "checks"))
- #:ttl 0)
- #:systems %systems-to-submit-builds-for)
- (lambda (url)
- (with-sqlite-cache
- database
- 'derivation-changes
- patch-series-derivation-changes
- #:args (list url)
- #:ttl (* 60 20))))))
+ (with-exception-handler
+ (lambda (exn)
+ (simple-format
+ (current-error-port)
+ "failed fetching derivation changes for issue ~A: ~A\n"
+ (car series)
+ exn)
+
+ #f)
+ (lambda ()
+ (and=>
+ (patch-series-derivation-changes-url
+ (with-sqlite-cache
+ database
+ 'patchwork-patch-checks
+ patchwork-patch-checks
+ #:args (list
+ (assoc-ref (first (assoc-ref series "patches"))
+ "checks"))
+ #:ttl 0)
+ #:systems %systems-to-submit-builds-for)
+ (lambda (url)
+ (with-sqlite-cache
+ database
+ 'derivation-changes
+ patch-series-derivation-changes
+ #:args (list url)
+ #:ttl (* 60 20)))))
+ #:unwind? #t)))
(and derivation-changes
(with-sqlite-cache