diff options
author | Christopher Baines <mail@cbaines.net> | 2023-05-10 14:20:27 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-05-10 14:20:27 +0100 |
commit | 4cf82ff8ca82727a2af605d7ff6e77355cd40806 (patch) | |
tree | 4d709f14582328cad74000185b5f2798c01ed5f8 /guix-build-coordinator | |
parent | b0e82fbea081f326ec7dd592fb49dc062e2b3d00 (diff) | |
download | build-coordinator-4cf82ff8ca82727a2af605d7ff6e77355cd40806.tar build-coordinator-4cf82ff8ca82727a2af605d7ff6e77355cd40806.tar.gz |
Don't log so much when the database is busy
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r-- | guix-build-coordinator/agent-messaging/http/server.scm | 5 | ||||
-rw-r--r-- | guix-build-coordinator/client-communication.scm | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/guix-build-coordinator/agent-messaging/http/server.scm b/guix-build-coordinator/agent-messaging/http/server.scm index 389277f..8e27f53 100644 --- a/guix-build-coordinator/agent-messaging/http/server.scm +++ b/guix-build-coordinator/agent-messaging/http/server.scm @@ -892,6 +892,10 @@ port. Also, the port used can be changed by passing the --port option.\n" (render-json `((error . chunked-input-ended-prematurely)) #:code 400)) + ((worker-thread-timeout-error? exn) + (render-json + `((error . ,(simple-format #f "~A" exn))) + #:code 503)) (else (render-json `((error . ,(simple-format #f "~A" exn))) @@ -902,6 +906,7 @@ port. Also, the port used can be changed by passing the --port option.\n" (lambda (key . args) (unless (and (eq? '%exception key) (or (agent-error? (car args)) + (worker-thread-timeout-error? (car args)) (chunked-input-ended-prematurely-error? (car args)))) (match method-and-path-components ((method path-components ...) diff --git a/guix-build-coordinator/client-communication.scm b/guix-build-coordinator/client-communication.scm index c98d403..67d8f65 100644 --- a/guix-build-coordinator/client-communication.scm +++ b/guix-build-coordinator/client-communication.scm @@ -608,6 +608,10 @@ (render-json `((error . ,(client-error-details exn))) #:code 400)) + ((worker-thread-timeout-error? exn) + (render-json + `((error . ,(simple-format #f "~A" exn))) + #:code 503)) (else (render-json `((error . 500)) @@ -617,7 +621,9 @@ controller-thunk (lambda (key . args) (unless (and (eq? '%exception key) - (client-error? (car args))) + (or + (worker-thread-timeout-error? (car args)) + (client-error? (car args)))) (match method-and-path-components ((method path-components ...) (simple-format |