Closed robbiehudson closed 13 years ago
good catch. I'll try to take a look this weekend
Did you have any luck with this?
I've taken a little deeper look and I'm not sure what I want to do. The stats are there to say that n number of jobs have failed, they aren't really there to give a count of the number of jobs in the failed queue.
What is the use case you have for changing the stats count?
Good point.
We're using it to monitor how many jobs have failed (so we can set an alert if it gets too high).
At the moment the length of the failed queue isn't exposed through the res object. We can just do something like redis.llen("resque:failed") but it'd be nice if we could access that through the res object (res.failed_size()) for instance.
you could use the count function in the failure module.
from pyres import failure
failure.count(resq)
i'm going to close this out since there is a solution
The delete all view directly removes the failed queue from Redis. This means that the stats don't get updated.