diff options
Diffstat (limited to 'guix-qa-frontpage/branch.scm')
-rw-r--r-- | guix-qa-frontpage/branch.scm | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/guix-qa-frontpage/branch.scm b/guix-qa-frontpage/branch.scm index 6276476..581c98b 100644 --- a/guix-qa-frontpage/branch.scm +++ b/guix-qa-frontpage/branch.scm @@ -32,6 +32,7 @@ #:use-module ((guix build syscalls) #:select (set-thread-name)) #:use-module (fibers) + #:use-module (knots) #:use-module (knots non-blocking) #:use-module (guix-qa-frontpage utils) #:use-module (guix-qa-frontpage mumi) @@ -83,10 +84,13 @@ (with-exception-handler (lambda (exn) - (simple-format #t "exception listing non master branches: ~A\n" exn) `((exception . ,(simple-format #f "~A" exn)))) (lambda () - (with-throw-handler #t + (with-exception-handler + (lambda (exn) + (simple-format #t "exception listing non master branches\n") + (print-backtrace-and-exception/knots exn) + (raise-exception exn)) (lambda () (let* ((merge-issues (merge-issues-by-branch)) @@ -186,10 +190,7 @@ b-blocked-by))) (if (null? ordering-indexes) b-initial-ordering-index - (apply max ordering-indexes))))))))))) - (lambda args - (display (backtrace) (current-error-port)) - (newline (current-error-port))))) + (apply max ordering-indexes))))))))))))) #:unwind? #t)) (define (branch-derivation-changes-data revisions system) @@ -428,15 +429,16 @@ (with-exception-handler (lambda (exn) - (simple-format - (current-error-port) - "failed fetching derivation changes for branch ~A: ~A\n" - branch-name - exn) - #f) (lambda () - (with-throw-handler #t + (with-exception-handler + (lambda (exn) + (simple-format + (current-error-port) + "failed fetching derivation changes for branch ~A\n" + branch-name) + (print-backtrace-and-exception/knots exn) + (raise-exception exn)) (lambda () (let ((revisions derivation-change-counts @@ -456,9 +458,7 @@ (assq-ref substitute-availability 'exception)) (update-branch-substitute-availability-metrics branch-name - substitute-availability)))) - (lambda _ - (backtrace)))) + substitute-availability)))))) #:unwind? #t)) #t) branches)) @@ -481,18 +481,17 @@ (while #t (let ((start-time (current-time))) (with-exception-handler - (lambda (exn) - (simple-format - (current-error-port) - "exception in branch data refresh thread: ~A\n" - exn)) + (lambda _ #f) (lambda () (with-time-logging "refreshing branch data" - (with-throw-handler #t - refresh-data - (lambda args - (display (backtrace) (current-error-port)) - (newline (current-error-port)))))) + (with-exception-handler + (lambda (exn) + (simple-format + (current-error-port) + "exception in branch data refresh thread\n") + (print-backtrace-and-exception/knots exn) + (raise-exception exn)) + refresh-data))) #:unwind? #t) (let ((time-taken |