Remove the priority scheudler
As I'm not sure it's helping.
This commit is contained in:
parent
8a08c725b3
commit
31f226cd46
1 changed files with 3 additions and 37 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue