This is more a feature request/suggestion than a bug.
I sugest adding the possibility of setting timeout = None on the task (and also on the ONCE_DEFAULT_TIMEOUT configuration key). When doing so, no TTL would be set on the lock keys. Only the completion (or the failure) of the task itself would remove the lock, in the Task.after_return method.
I think this could be useful in the case of regular tasks with a highly variable time of execution, given the amount of work they have to perform. In this case, we just want to make sure the task is not executed concurrently multiple times, intead of having to guess an appropriate timeout.
It also should not break any pre-existing behaviour. What do you think?
This is more a feature request/suggestion than a bug.
I sugest adding the possibility of setting
timeout = None
on the task (and also on theONCE_DEFAULT_TIMEOUT
configuration key). When doing so, no TTL would be set on the lock keys. Only the completion (or the failure) of the task itself would remove the lock, in theTask.after_return
method.I think this could be useful in the case of regular tasks with a highly variable time of execution, given the amount of work they have to perform. In this case, we just want to make sure the task is not executed concurrently multiple times, intead of having to guess an appropriate timeout.
It also should not break any pre-existing behaviour. What do you think?