Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

mark tasks that are stopped that never started with an error #935

Merged

Conversation

bmc-msft
Copy link
Contributor

Fixes #934

@bmc-msft bmc-msft changed the title Mark stopped scheduled tasks as failed mark tasks that are stopped that never started with an error May 26, 2021
@@ -19,7 +19,7 @@ def main(mytimer: func.TimerRequest, dashboard: func.Out[str]) -> None: # noqa:
expired_tasks = Task.search_expired()
for task in expired_tasks:
logging.info("stopping expired task: %s", task.job_id)
task.stopping()
task.mark_stopping()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this change relate to the other? Is it required?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is required, such that instead of calling the state handler directly, it does all of the other related stuff.

State handling is something we could use another refactor on, but that's out of scope for fixing this issue.

@bmc-msft bmc-msft merged commit d557fc1 into microsoft:main May 26, 2021
@bmc-msft bmc-msft deleted the mark-stopped-scheduled-tasks-as-failed branch May 26, 2021 22:42
@ghost ghost locked as resolved and limited conversation to collaborators Jun 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

explain why some tasks don't get started in a job
3 participants