diff --git a/guix-data-service/web/server.scm b/guix-data-service/web/server.scm index 2ae9b69..eb3e601 100644 --- a/guix-data-service/web/server.scm +++ b/guix-data-service/web/server.scm @@ -112,37 +112,9 @@ #:unwind? #t) (let ((finished? (make-condition)) - (priority-scheduler #f) (request-scheduler #f)) (call-with-sigint (lambda () - (call-with-new-thread - (lambda () - (run-fibers - (lambda () - (let* ((current (current-scheduler)) - (schedulers - (cons current (scheduler-remote-peers current)))) - - (set! priority-scheduler current) - - (for-each - (lambda (i sched) - (spawn-fiber - (lambda () - (catch 'system-error - (lambda () - (set-thread-name - (string-append "priority " (number->string i)))) - (const #t))) - sched)) - (iota (length schedulers)) - schedulers)) - - (wait finished?)) - #:hz 0 - #:parallelism 1))) - (run-fibers (lambda () (let* ((current (current-scheduler)) @@ -161,9 +133,6 @@ (iota (length schedulers)) schedulers)) - (while (not priority-scheduler) - (sleep 0.1)) - (let ((requests-metric (make-counter-metric registry "requests_total"))) @@ -191,8 +160,7 @@ port. Also, the port used can be changed by passing the --port option.\n" #:idle-seconds 5 #:destructor (lambda (conn) - (close-postgresql-connection conn "background")) - #:scheduler priority-scheduler)) + (close-postgresql-connection conn "background")))) (connection-pool (make-resource-pool @@ -208,8 +176,7 @@ port. Also, the port used can be changed by passing the --port option.\n" (close-postgresql-connection conn "web")) #:default-max-waiters (floor (/ postgresql-connections 2)) #:default-checkout-timeout (/ postgresql-statement-timeout - 1000) - #:scheduler priority-scheduler)) + 1000))) (reserved-connection-pool (make-resource-pool @@ -224,8 +191,7 @@ port. Also, the port used can be changed by passing the --port option.\n" (lambda (conn) (close-postgresql-connection conn "web-reserved")) #:default-max-waiters postgresql-connections - #:default-checkout-timeout 6 - #:scheduler priority-scheduler))) + #:default-checkout-timeout 6))) (let ((resource-pool-checkout-failures-metric (make-counter-metric registry