mirror of
https://github.com/jlengrand/bugsink.git
synced 2026-03-10 08:01:17 +00:00
Release worker_semaphore when failing to create worker
exposed when playing around with arbitrary Tasks in a shell; this created workers I could not run, which would put the foreman in a 'waiting for available threads' mode. I briefly looked at the rest of that loop to see whether more exception handling is necessary, but TBH I don't think we can reasonably recover from e.g. task.delete() failing (or at least I don't want to think about it now)
This commit is contained in:
@@ -296,6 +296,7 @@ class Foreman:
|
||||
with time_to_logger(performance_logger, "Snappea delete Task"):
|
||||
task.delete() # we delete the task because we can't do anything with it, and we don't want to hang
|
||||
capture_exception(e)
|
||||
self.worker_semaphore.release()
|
||||
continue
|
||||
|
||||
self.check_for_stopping() # check_for_stopping() right before taking on the work
|
||||
|
||||
Reference in New Issue
Block a user