bull icon indicating copy to clipboard operation
bull copied to clipboard

Clarification on `queue.empty()` behavior

Open marshall007 opened this issue 8 years ago • 5 comments

It seems as though queue.empty() does not remove active or failed jobs from redis, but this does not appear to be explicitly documented anywhere. Can someone elaborate on if/why this behavior is desirable?

Also, after reading through #83 and #92, it's still unclear to me why there isn't a higher-level abstraction for totally destroying a queue. It seems like there should be a method for pausing the queue, cleaning up all jobs, and removing the queue metadata from redis.

marshall007 avatar Jun 23 '17 00:06 marshall007

We could have an atomic script that deletes everything. Also the queue needs to be stopped so that no new data appears after its completion. I can add this as a feature request.

manast avatar Jun 23 '17 08:06 manast

@manast that would be great. Given that the only way to list and restart active queues is to list the keys for bull:*:id, it would be really helpful if there were a way to fully purge them from redis.

marshall007 avatar Jun 23 '17 15:06 marshall007

Any progress on this?

Sicria avatar Sep 04 '17 00:09 Sicria

yes i would appreciate this feature

dotob avatar Sep 09 '18 10:09 dotob

:+1: that would be extra nice

lambrojos avatar Sep 27 '18 16:09 lambrojos