You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ensuring the burst worker shuts down if there are no jobs in the queue #501
If the worker has burst mode enabled, it seems like it does not shut down immediately even if there are 0 jobs in the queue to start with.
Is there a way to enable this? I tried playing around with max_burst_jobs but it doesn't seem to change this behavior.
Potentially, I think it's possible to add something like this to the main function:
if self.burst:
queued_jobs = await self.pool.zcard(self.queue_name)
if queued_jobs == 0:
logger.info('No jobs in queue, worker terminating in burst mode.')
return
Activity