Fix when abort callback is set, set task status to stopped only if running locally, otherwise leave it for the Agent to set it.

This commit is contained in:
allegroai 2024-07-31 17:25:12 +03:00
parent b298e212dd
commit 62dd92a22d

View File

@ -4148,6 +4148,9 @@ class Task(_Task):
) )
) )
self.flush(wait_for_uploads=True) self.flush(wait_for_uploads=True)
# if running remotely, we want the daemon to kill us
if self.running_locally():
self.stopped(status_reason='USER ABORTED') self.stopped(status_reason='USER ABORTED')
if self._dev_worker: if self._dev_worker: