I want to create multiple celery tasks from the same function, and they will differ in the parameters that I pass to the task decorator. Let's say I want to set different timeouts for paid and free account in my system.
I was expecting that applying the task decorator in the following way will do the trick:
def _update(x, y):
...
update_free = task(soft_time_limit=300, time_limit=305)(_update)
update_paid = task(time_limit=1800)(_update)
But I see in the log that neither update_paid nor update_free are registered as tasks. Instead for some reason _update is registered as a task.
I don't why celery/django-celery does this, seem to be quite obscure to me. Does anyone have any idea how to fix this? Thanks.