Replies: 1 comment
-
|
Having to temporarily resume a task, only to decide whether to continue or resume it again is quite inefficient. For your use case, depending on how often a user gives said feedback, a better model would be a scheduled cron job which runs every minute to check whether further action is needed. That would split a task in 2, rather than having a "pause" in the middle. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, this addition to Django is great, I am really putting it to good use, but I have a suggestion / request
Could there be a new task status implemented called "Paused"?
We have a use case where a kind of work plan is generated inside a task and then the user is prompted for confirmation before beginning, or to provide additional information about how to adjust the work plan.
Our idea was to be able to update another object in the database required for getting the user feedback, and then setting the task to "paused" while it is waiting for the user feedback. At this point it would enter a polling loop to check if the user feedback has arrived, and then resume the task.
We haven't implemented it yet but currently our plan is to store this as a metadata attribute of the task, but it would be nice to be able to more officially mark the task as Paused to indicate that, while the process is still technically running, it is in fact idling waiting for some other external factor.
Beta Was this translation helpful? Give feedback.
All reactions