Fix --services-mode when the execute agent fails when starting to run with error code 0

This commit is contained in:
allegroai 2021-06-16 18:32:29 +03:00
parent 29bf993be7
commit 176b4a4cde

View File

@ -1423,7 +1423,7 @@ class Worker(ServiceCommandSection):
# get diff from previous poll
printed_lines, stdout_pos_count = _print_file(stdout_path, stdout_pos_count)
if self._services_mode and not stopping and not status:
if self._services_mode and not stopping and status is None:
# if the internal agent started, we stop logging, it will take over logging.
# if the internal agent started running the task itself, it will return status==0,
# then we can quit the monitoring loop of this process