diff options
author | Christopher Baines <mail@cbaines.net> | 2023-07-25 17:27:06 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-07-25 17:27:06 +0100 |
commit | ad81d052c9e0dd596416095be49134b3bc5a2851 (patch) | |
tree | 0b13414c982bb3e2156c057f59898604da4f14b5 | |
parent | 8854c9df1b5aa4771a86a99811436046305e3ecd (diff) | |
download | qa-frontpage-ad81d052c9e0dd596416095be49134b3bc5a2851.tar qa-frontpage-ad81d052c9e0dd596416095be49134b3bc5a2851.tar.gz |
Set thread names
To help with debugging.
-rw-r--r-- | guix-qa-frontpage/branch.scm | 7 | ||||
-rw-r--r-- | guix-qa-frontpage/issue.scm | 7 | ||||
-rw-r--r-- | guix-qa-frontpage/manage-builds.scm | 17 | ||||
-rw-r--r-- | guix-qa-frontpage/manage-patch-branches.scm | 7 |
4 files changed, 38 insertions, 0 deletions
diff --git a/guix-qa-frontpage/branch.scm b/guix-qa-frontpage/branch.scm index 51fa4ef..0c90bc9 100644 --- a/guix-qa-frontpage/branch.scm +++ b/guix-qa-frontpage/branch.scm @@ -26,6 +26,8 @@ #:use-module (prometheus) #:use-module ((guix-build-coordinator utils) #:select (with-time-logging)) + #:use-module ((guix build syscalls) + #:select (set-thread-name)) #:use-module (guix-qa-frontpage mumi) #:use-module (guix-qa-frontpage git-repository) #:use-module (guix-qa-frontpage guix-data-service) @@ -440,6 +442,11 @@ (call-with-new-thread (lambda () + (catch 'system-error + (lambda () + (set-thread-name "branch data refresh")) + (const #t)) + (while #t (let ((start-time (current-time))) (with-exception-handler diff --git a/guix-qa-frontpage/issue.scm b/guix-qa-frontpage/issue.scm index 3cc9516..1dc56b7 100644 --- a/guix-qa-frontpage/issue.scm +++ b/guix-qa-frontpage/issue.scm @@ -23,6 +23,8 @@ #:use-module (ice-9 threads) #:use-module ((guix-build-coordinator utils) #:select (with-time-logging)) + #:use-module ((guix build syscalls) + #:select (set-thread-name)) #:use-module (guix-qa-frontpage database) #:use-module (guix-qa-frontpage manage-builds) #:use-module (guix-qa-frontpage manage-patch-branches) @@ -291,6 +293,11 @@ (call-with-new-thread (lambda () + (catch 'system-error + (lambda () + (set-thread-name "data refresh")) + (const #t)) + (while #t (let ((start-time (current-time))) (with-exception-handler diff --git a/guix-qa-frontpage/manage-builds.scm b/guix-qa-frontpage/manage-builds.scm index 5d23e3d..057547d 100644 --- a/guix-qa-frontpage/manage-builds.scm +++ b/guix-qa-frontpage/manage-builds.scm @@ -6,6 +6,8 @@ #:use-module (ice-9 streams) #:use-module (ice-9 threads) #:use-module (guix sets) + #:use-module ((guix build syscalls) + #:select (set-thread-name)) #:use-module (guix-build-coordinator utils) #:use-module (guix-build-coordinator client-communication) #:use-module (guix-qa-frontpage database) @@ -144,6 +146,11 @@ (call-with-new-thread (lambda () + (catch 'system-error + (lambda () + (set-thread-name "patch builds")) + (const #t)) + (while #t (with-exception-handler (lambda (exn) @@ -279,6 +286,11 @@ (call-with-new-thread (lambda () + (catch 'system-error + (lambda () + (set-thread-name "branch builds")) + (const #t)) + (while #t (with-exception-handler (lambda (exn) @@ -611,6 +623,11 @@ (call-with-new-thread (lambda () + (catch 'system-error + (lambda () + (set-thread-name "system test builds")) + (const #t)) + (while #t (with-exception-handler (lambda (exn) diff --git a/guix-qa-frontpage/manage-patch-branches.scm b/guix-qa-frontpage/manage-patch-branches.scm index b29cf67..f10ba9f 100644 --- a/guix-qa-frontpage/manage-patch-branches.scm +++ b/guix-qa-frontpage/manage-patch-branches.scm @@ -13,6 +13,8 @@ #:use-module (guix sets) #:use-module (guix memoization) #:use-module (guix build utils) + #:use-module ((guix build syscalls) + #:select (set-thread-name)) #:use-module (guix-build-coordinator utils) #:use-module ((guix build download) #:select (http-fetch)) #:use-module ((guix build utils) #:select (with-directory-excursion)) @@ -409,6 +411,11 @@ (call-with-new-thread (lambda () + (catch 'system-error + (lambda () + (set-thread-name "patch branches")) + (const #t)) + (while #t (with-exception-handler (lambda (exn) |