You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
First of all, thanks for creating this library!
Related to the key collisions issue #19, I was wondering if passing a function that generates the key from the task's arguments as an alternative to specifying the arguments would be a good solution?
In my case, I need to add the tenant's name somewhere in the key because I want the tasks to only be locked for the same tenant.
The solution proposed seems to address this kind of issues in a generic way.
The text was updated successfully, but these errors were encountered:
adimux
changed the title
Custom key generation
Custom key generation function
Apr 15, 2019
I'm don't think key_func is the best name, but I'd need more time to think of a better name. I don't have the bandwidth to implement this currently, but if you'd like to submit a PR, I will get it merged + released.
Alternatively, if you want to work around this on the current version of celery once, you could just pass a tenant_id to the task's arguments (even if it isn't used in the function), and that, in turn, will be used to generate the key.
Hi,
First of all, thanks for creating this library!
Related to the key collisions issue #19, I was wondering if passing a function that generates the key from the task's arguments as an alternative to specifying the arguments would be a good solution?
In my case, I need to add the tenant's name somewhere in the key because I want the tasks to only be locked for the same tenant.
The solution proposed seems to address this kind of issues in a generic way.
The text was updated successfully, but these errors were encountered: