Purge old failed jobs
NathanBaulch opened this issue · 1 comments
NathanBaulch commented
I've been using Qless in production for over 3 years and have accumulated over 500,000 failed jobs. Is there a "right" way to purge failures older than n days or do I have to roll my sleeves up and write a redis-cli
script?
dlecocq commented
The best way is probably to call client.jobs.failed()
to get all the failure groups, and then you can use client.jobs.failed(group, offset, count)
to get all the associated jobs and then for each job you can make a decision to keep or cancel it.
At least, that's how we've scripted it up in the past.