Use the connection pool for build events
I'm not sure why this wasn't the way it worked previously. This should avoid unconstrained use of PostgreSQL connections.
This commit is contained in:
parent
9f102dbd39
commit
f2e2ca7a07
1 changed files with 15 additions and 17 deletions
|
|
@ -121,23 +121,21 @@
|
||||||
(define (spawn-fiber-for-handler handler)
|
(define (spawn-fiber-for-handler handler)
|
||||||
(spawn-fiber
|
(spawn-fiber
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(with-postgresql-connection
|
(with-resource-from-pool (connection-pool) conn
|
||||||
"build-event-handler-conn"
|
(with-exception-handler
|
||||||
(lambda (conn)
|
(lambda (exn)
|
||||||
(with-exception-handler
|
(simple-format
|
||||||
(lambda (exn)
|
(current-error-port)
|
||||||
(simple-format
|
"exception in build event handler: ~A\n"
|
||||||
(current-error-port)
|
exn))
|
||||||
"exception in build event handler: ~A\n"
|
(lambda ()
|
||||||
exn))
|
(with-throw-handler #t
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(with-throw-handler #t
|
(handler conn))
|
||||||
(lambda ()
|
(lambda _
|
||||||
(handler conn))
|
(display (backtrace) (current-error-port))
|
||||||
(lambda _
|
(display "\n" (current-error-port)))))
|
||||||
(display (backtrace) (current-error-port))
|
#:unwind? #t)))))
|
||||||
(display "\n" (current-error-port)))))
|
|
||||||
#:unwind? #t))))))
|
|
||||||
|
|
||||||
(define (with-build-ids-for-status data
|
(define (with-build-ids-for-status data
|
||||||
build-ids
|
build-ids
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue