guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: Fix marking jobs as failed when exceptions are raised


From: Christopher Baines
Subject: 01/02: Fix marking jobs as failed when exceptions are raised
Date: Fri, 20 Mar 2020 04:29:03 -0400 (EDT)

cbaines pushed a commit to branch master
in repository data-service.

commit e0f920bb14c9598a4c251c05c2c5c2cd76feb7ac
Author: Christopher Baines <address@hidden>
AuthorDate: Thu Mar 19 20:42:59 2020 +0000

    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.
---
 guix-data-service/jobs/load-new-guix-revision.scm | 28 +++++++++++++----------
 1 file 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]