diff options
author | Christopher Baines <mail@cbaines.net> | 2023-07-25 16:53:59 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-07-25 16:53:59 +0100 |
commit | 59150ff89e996bcd0cfed217f87f14b194d6f4f6 (patch) | |
tree | 7300ed2547ca310f5a6abc7bf14d21236d5233a8 /guix-qa-frontpage/server.scm | |
parent | d8df5596467ab28c61a88301e5a3d58c6b7b3dda (diff) | |
download | qa-frontpage-59150ff89e996bcd0cfed217f87f14b194d6f4f6.tar qa-frontpage-59150ff89e996bcd0cfed217f87f14b194d6f4f6.tar.gz |
Reduce the fibers parallelism
To avoid having too many threads.
Diffstat (limited to 'guix-qa-frontpage/server.scm')
-rw-r--r-- | guix-qa-frontpage/server.scm | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/guix-qa-frontpage/server.scm b/guix-qa-frontpage/server.scm index 039a937..cddacf7 100644 --- a/guix-qa-frontpage/server.scm +++ b/guix-qa-frontpage/server.scm @@ -28,6 +28,7 @@ #:use-module (web uri) #:use-module (prometheus) #:use-module (system repl error-handling) + #:use-module (fibers) #:use-module (fibers web server) #:use-module (guix store) #:use-module (guix-data-service web util) @@ -521,22 +522,10 @@ has no patches or has been closed.") (apply make-controller assets-directory database metrics-registry controller-args)) - (call-with-error-handling + (run-fibers (lambda () (run-server (lambda (request body) (apply values (handler request body controller))) #:host host #:port port)) - #:on-error 'backtrace - #:post-error (lambda (key . args) - (when (eq? key 'system-error) - (match args - (("bind" "~A" ("Address already in use") _) - (simple-format - (current-error-port) - "\n -error: guix-data-service could not start, as it could not bind to port ~A - -Check if it's already running, or whether another process is using that -port. Also, the port used can be changed by passing the --port option.\n" - port))))))) + #:parallelism 2)) |