Fix delete temp console pipe log files after Task execution is completed. This is important for long lasting services agents, avoiding collecting temp files on host machine

This commit is contained in:
allegroai 2024-02-29 14:03:30 +02:00
parent 9a321a410f
commit 059a9385e9

View File

@ -2033,6 +2033,11 @@ class Worker(ServiceCommandSection):
if stop_signal and stop_signal.was_abort_function_called(status):
stop_reason = TaskStopReason.stopped
# now we delete the temp files
safe_remove_file(stdout_path)
if stderr_path:
safe_remove_file(stdout_path)
return status, stop_reason
def _check_if_internal_agent_started(self, printed_lines, service_mode_internal_agent_started, task_id):