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
{{ message }}
This repository has been archived by the owner on Feb 27, 2021. It is now read-only.
When scheduling tasks, is it possible to get the id of the Task object that has been created in the database? That would be really useful, since it would enable us to cancel the scheduled task, simply by deleting the object.
The text was updated successfully, but these errors were encountered:
It's not currently possible (it's currently fire and forget). I'll look into returning an object that would let you get the id when you schedule a task (currently None is returned).
One things that occurs to me about this is being careful not to delete a task that's actually in the process of being run. We'd probably need to lock the task (in the same manner as the worker process) before deleting to avoid this issue. Plus we'd need to report back whether the deletion was successful or not. For tasks scheduled in the future it should always work, but there is the edge case of tasks that are getting cancelled just as they are about to run...
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When scheduling tasks, is it possible to get the id of the Task object that has been created in the database? That would be really useful, since it would enable us to cancel the scheduled task, simply by deleting the object.
The text was updated successfully, but these errors were encountered: