Bull: Clarification on `queue.empty()` behavior

Created on 23 Jun 2017  路  5Comments  路  Source: OptimalBits/bull

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.

enhancement

Most helpful comment

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.

All 5 comments

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 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.

Any progress on this?

yes i would appreciate this feature

:+1: that would be extra nice

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pintocarlos picture pintocarlos  路  3Comments

alolis picture alolis  路  4Comments

rodrigoords picture rodrigoords  路  4Comments

thelinuxlich picture thelinuxlich  路  3Comments

joe-at-startupmedia picture joe-at-startupmedia  路  3Comments