-
Notifications
You must be signed in to change notification settings - Fork 182
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
Api.clear_* functions doesn't clear unique_tokens #494
Comments
I believe the uniq tokens should have TTL set, so it should get cleared
eventually
…On Mon, 9 Dec, 2024, 5:42 pm Dmitry Kleymenov, ***@***.***> wrote:
If jobs have unique_tokens and we want to clear any queue, we have dead
tokens without a chance to remove them. The same is true for remove_*
functions
—
Reply to this email directly, view it on GitHub
<#494>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABEN5QUU43ACJMJYYIME4L2EWCMPAVCNFSM6AAAAABTIWCTGCVHI2DSMVQWIX3LMV43ASLTON2WKOZSG4ZDMOBWG44TONA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
But what is the purpose of keeping tokens without jobs? For example, we have infinite TTL, cause we waiting for other services to up. And we can't remove tokens at all. May be an additional API function for removing it will do the trick. We just don't want to have "dead" values in Redis forever. If you agree, I can prepare pr for a new function or for removing tokens inside |
There might be some weird cases, but I generally agree with you. When a user deletes a job, they might expect the token to be deleted as well. Adding a separate API to clear tokens would be overkill; it can be an option in the same function and default to Please feel free to open a PR. |
By the way, I am also not sure it's possible to delete all tokens since some tokens might be supplied by the user as well (not derived from job args). In that case, it's okay not to support those. Thinking again, it might be better to keep the default as |
If jobs have
unique_token
s and we clear any queue, we havedead
tokens without a chance to remove them. The same is true forremove_*
functionsThe text was updated successfully, but these errors were encountered: