Add exception handling for processing background jobs
This commit is contained in:
parent
47ac73e5a7
commit
42711310fd
1 changed files with 44 additions and 31 deletions
|
|
@ -248,6 +248,18 @@ port. Also, the port used can be changed by passing the --port option.\n"
|
|||
(while (not (check-startup-completed startup-completed))
|
||||
(sleep 1))
|
||||
|
||||
(with-exception-handler
|
||||
(lambda _ #f)
|
||||
(lambda ()
|
||||
(with-exception-handler
|
||||
(lambda (exn)
|
||||
(simple-format
|
||||
#t
|
||||
"exception when processing the background jobs queue")
|
||||
(print-backtrace-and-exception/knots
|
||||
exn)
|
||||
(raise-exception exn))
|
||||
(lambda ()
|
||||
(call-with-resource-from-pool (background-connection-pool)
|
||||
(lambda (conn)
|
||||
(let ((build-ids
|
||||
|
|
@ -278,7 +290,8 @@ port. Also, the port used can be changed by passing the --port option.\n"
|
|||
(delete-background-processing-entries-for-build-ids
|
||||
conn
|
||||
build-id))
|
||||
build-ids)))))
|
||||
build-ids)))))))
|
||||
#:unwind? #t))
|
||||
#:parallel? #t)
|
||||
|
||||
(spawn-fiber
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue