Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Queue age only updated when a dequeue happens #105

Closed
eric opened this issue Aug 18, 2012 · 4 comments
Closed

Queue age only updated when a dequeue happens #105

eric opened this issue Aug 18, 2012 · 4 comments

Comments

@eric
Copy link
Contributor

eric commented Aug 18, 2012

I've noticed if a lot of enqueues are done with no dequeues, the queue age stat is not updated.

It would be nice if it always reflected the current age of the head of the queue instead of only on remove.

@zuercher
Copy link
Contributor

Master has a change that partially fixes this. Instead of updating the age per remove, it now tracks the timestamp of the last removed item and computes the age when requested (by stats or otherwise).

Still doesn't reflect the true age of the head of the queue, so if you remove a very old item and then stop reading for a while it will report a larger age than is strictly true. I'll look into peeking at the head.

@eric
Copy link
Contributor Author

eric commented Aug 25, 2012

This solution is definitely preferable — I would much rather err on the side of it being older than it really is than be newer to allow for alerting based on the age.

@eric
Copy link
Contributor Author

eric commented Sep 11, 2012

Would it be possible to get a build with 8c95afc in it?

@zuercher
Copy link
Contributor

this is 2.3.4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants