Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added HLEN to the list of prefixed redis commands #1540

Merged
merged 1 commit into from
Apr 28, 2022
Merged

Added HLEN to the list of prefixed redis commands #1540

merged 1 commit into from
Apr 28, 2022

Conversation

vinayinvicible
Copy link
Contributor

@vinayinvicible vinayinvicible commented Apr 25, 2022

Although HLEN is not used anywhere inside kombu or celery, it is the method that is used to get the count of unacked messages.
This can be used similar to monitoring celery queue length.

The unacked_key that is used to store info about the unacknowledged tasks is a hash.
If I wish to identify whether all celery tasks have been processed, I need to ensure that the unacked_key is empty along with queues length also.
When using a prefix, HLEN should also use the same key prefix.

Copy link
Member

@thedrow thedrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HLEN can return the number of fields in a hash. Are you confusing it with another command?

@vinayinvicible
Copy link
Contributor Author

@thedrow
No. I mean HLEN only.
The unacked_key that is used to store info about the unacknowledged tasks is a hash.
If I wish to identify whether all celery tasks have been processed, I need to ensure that the unacked_key is empty along with queues length also.

@thedrow thedrow merged commit f182a98 into celery:master Apr 28, 2022
@auvipy auvipy added this to the 5.3 milestone Apr 28, 2022
@vinayinvicible vinayinvicible deleted the unacked-monitor-fix branch April 29, 2022 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants