mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-16 11:58:09 +00:00
mark tasks that are stopped that never started with an error (#935)
This commit is contained in:
@ -195,6 +195,11 @@ class Task(BASE_TASK, ORMMixin):
|
||||
)
|
||||
return
|
||||
|
||||
if self.state not in TaskState.has_started():
|
||||
self.mark_failed(
|
||||
Error(code=ErrorCode.TASK_FAILED, errors=["task never started"])
|
||||
)
|
||||
|
||||
self.set_state(TaskState.stopping)
|
||||
|
||||
def mark_failed(
|
||||
|
Reference in New Issue
Block a user