diff options
Diffstat (limited to 'guix-qa-frontpage/manage-patch-branches.scm')
-rw-r--r-- | guix-qa-frontpage/manage-patch-branches.scm | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/guix-qa-frontpage/manage-patch-branches.scm b/guix-qa-frontpage/manage-patch-branches.scm index 7cb9cee..3aec254 100644 --- a/guix-qa-frontpage/manage-patch-branches.scm +++ b/guix-qa-frontpage/manage-patch-branches.scm @@ -19,6 +19,7 @@ #:use-module (guix build utils) #:use-module ((guix build download) #:select (http-fetch)) #:use-module ((guix build utils) #:select (with-directory-excursion)) + #:use-module (knots) #:use-module (knots thread-pool) #:use-module (guix-qa-frontpage mumi) #:use-module (guix-qa-frontpage database) @@ -274,12 +275,6 @@ (lambda (exn) (simple-format (current-error-port) - "exception when creating branch for ~A: ~A\n" - issue-number - exn) - - (simple-format - (current-error-port) "deleting tag and branch for issue\n") (system* "git" "push" "--delete" "patches" (simple-format #f "base-for-issue-~A" issue-number)) @@ -288,11 +283,15 @@ (raise-exception exn)) (lambda () - (with-throw-handler #t - apply-patches - (lambda args - (display (backtrace) (current-error-port)) - (newline (current-error-port))))) + (with-exception-handler + (lambda (exn) + (simple-format + (current-error-port) + "exception when creating branch for ~A\n" + issue-number) + (print-backtrace-and-exception/knots exn) + (raise-exception exn)) + apply-patches)) #:unwind? #t)) #:remove-after? #t)))) @@ -515,22 +514,21 @@ (while #t (with-exception-handler (lambda (exn) - (simple-format - (current-error-port) - "exception in manage patch branches thread: ~A\n" - exn) (unless (thread-pool-timeout-error? exn) (sleep 240))) (lambda () - (with-throw-handler #t + (with-exception-handler + (lambda (exn) + (simple-format + (current-error-port) + "exception in manage patch branches thread\n") + (print-backtrace-and-exception/knots exn) + (raise-exception exn)) (lambda () (call-with-duration-metric metrics-registry "manage_patch_branches_duration_seconds" perform-pass - #:buckets (list 30 60 120 240 480 960 1920 3840 (inf)))) - (lambda args - (display (backtrace) (current-error-port)) - (newline (current-error-port)))) + #:buckets (list 30 60 120 240 480 960 1920 3840 (inf))))) (sleep 3600)) #:unwind? #t))))) |