aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-03-19 20:42:59 +0000
committerChristopher Baines <mail@cbaines.net>2020-03-19 20:43:37 +0000
commite0f920bb14c9598a4c251c05c2c5c2cd76feb7ac (patch)
tree2dc2a0c636f55cf313892ac1f152bbfc18e138f2 /guix-data-service
parentded4df66321b8d7c3fa1a0a9a8bc231656444a1b (diff)
downloaddata-service-e0f920bb14c9598a4c251c05c2c5c2cd76feb7ac.tar
data-service-e0f920bb14c9598a4c251c05c2c5c2cd76feb7ac.tar.gz
Fix marking jobs as failed when exceptions are raised
The switch away from catch broke this, I obviously still don't quite get how with-exception-handler works. Therefore, use it twice as that seems to help.
Diffstat (limited to 'guix-data-service')
-rw-r--r--guix-data-service/jobs/load-new-guix-revision.scm28
1 files changed, 16 insertions, 12 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm
index 3b5ce10..b554f99 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -1594,19 +1594,23 @@ SKIP LOCKED")
id
(lambda ()
(with-exception-handler
- (lambda (exn)
- (simple-format (current-error-port)
- "error: load-new-guix-revision: ~A\n"
- exn)
- (backtrace)
- #f)
+ (const #f)
(lambda ()
- (with-store-connection
- (lambda (store)
- (load-new-guix-revision conn
- store
- git-repository-id
- commit))))))))
+ (with-exception-handler
+ (lambda (exn)
+ (simple-format (current-error-port)
+ "error: load-new-guix-revision: ~A\n"
+ exn)
+ (backtrace)
+ #f)
+ (lambda ()
+ (with-store-connection
+ (lambda (store)
+ (load-new-guix-revision conn
+ store
+ git-repository-id
+ commit))))))
+ #:unwind? #t))))
#t))
(begin
(record-job-succeeded conn id)