-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[task scheduling] add intermediate Pending
state and update policy
#11985
Conversation
✅ Deploy Preview for prefect-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
src/prefect/task_server.py
Outdated
|
||
if not state.is_pending(): | ||
logger.exception( | ||
f"Aborted submission of task run {task_run.id!r} -" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fact that we "submit" task runs to a task runner isn't something the user should have to grapple with, IMO, because the language overlaps with Task.submit()
. Also, the user can't really do much about this and they didn't do something wrong, so I'd be inclined to log a warning message for them ("Aborted task run <>. The task may already be running.") and logging something at INFO or DEBUG with the server's response, which will basically look like gibberish anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in f612197
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks exactly how I expected it, nice!
based on discussion, we should:
SCHEDULED
->PENDING
->RUNNING
PENDING
->PENDING
(using the existingPreventPendingTransitions
rule) instead ofRUNNING
->RUNNING