What happens when code changes between task scheduling and execution? #110
-
So I was wondering what happens in the following case using the database backend.
I have searched in the code, but I don't see anything to add extra data/context to the task. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Currently, it's whatever is deployed at the time the task is executed that will be run - not whatever is running at enqueue time. In most cases, this is probably fine. For tasks using At some point, I'd like to add a TTL to tasks, whereby if they're unexecuted for too long, they're cancelled. That might be a way to work around this if it were causing issues. I think the ideal solution is to ensure task changes are backwards compatible for applications with large queue depths. |
Beta Was this translation helpful? Give feedback.
Currently, it's whatever is deployed at the time the task is executed that will be run - not whatever is running at enqueue time. In most cases, this is probably fine. For tasks using
run_after
, this could be a problem, but I think it's fairly niche.At some point, I'd like to add a TTL to tasks, whereby if they're unexecuted for too long, they're cancelled. That might be a way to work around this if it were causing issues.
I think the ideal solution is to ensure task changes are backwards compatible for applications with large queue depths.