Status for aborted tasks #246
Replies: 7 comments
-
|
If the shutdown is graceful, the task will be finished before terminating. Are you talking about if you try and kill the process again in a less-than-graceful way? |
Beta Was this translation helpful? Give feedback.
-
|
Apparently I enforced an actual kill with a second Ctrl + C, although another testing showed that the state would go into "Failed". So I guess this is more of a feature request or optional behavior: Instead of waiting for the task to finish, allow it to be aborted and the status set to aborted. As some background: We have some heavier tasks (like license scans or aggregating statistics) which might take 10 minutes or sometimes two hours. Being able to abort them and have a suitable state would make identification/monitoring easier, while allowing for timely worker reloads. |
Beta Was this translation helpful? Give feedback.
-
|
I think there are two issues here:
How do you stop (and restart) the worker in production where a user can't press |
Beta Was this translation helpful? Give feedback.
-
At the moment, we are using a custom task system which we want to replace with some more "standard one". It basically uses systemd services running the workers. In theory, services can have something like |
Beta Was this translation helpful? Give feedback.
-
any thoughts on about this approach ? |
Beta Was this translation helpful? Give feedback.
-
You could allow changing the state through the admin panel (or change it any other way) but that does not affect the worker. The worker will continue to execute the task as if nothing happened. |
Beta Was this translation helpful? Give feedback.
-
It will only execute if that task was triggered again. for example i have enpoint in that scenario worker will only execute if that enpoint hit again, i believe ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When using the database backend and stopping the worker, the worker does a graceful shutdown, but keeps the current task in the status "Running". As we are already doing a graceful shutdown, setting the task result to a new status like "Aborted" would make it more clear that the corresponding task is indeed not running any more.
Beta Was this translation helpful? Give feedback.
All reactions