-
Notifications
You must be signed in to change notification settings - Fork 91
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
Key collisions #19
Comments
@chripede Hey, thanks for the feature suggestion! e.g.
I'm not sure how I feel about a custom method on objects. Celery tends to err away from passing around models. |
@cameronmaske while they tend to err away from it, they still allow it. Everyone has a different use case. Anyways, I'll add a bogus parameter to my task to keep the keys unique. |
Why not to use |
When sending Django models as args to tasks, part of the key is generated by converting the model to a string. This causes key collisions for us since we have multiple objects that outputs the same from
__unicode__
I propose something like this https://github.com/chripede/celery-once/commit/a2b465ce8fd1aa6593cfb5bfe7712320e792bf5f to allow objects to create unique keys.
The code in my django model would look something like this
The text was updated successfully, but these errors were encountered: