mirror of
https://github.com/clearml/clearml-agent
synced 2025-03-03 10:42:05 +00:00
Fix services mode killing child processes when running in services mode + venv
This commit is contained in:
parent
b48f25a7f9
commit
382604e923
@ -1456,15 +1456,15 @@ class Worker(ServiceCommandSection):
|
||||
stop_reason = TaskStopReason.exception
|
||||
status = -1
|
||||
|
||||
# full cleanup (just in case)
|
||||
if process:
|
||||
kill_all_child_processes(process.pid)
|
||||
|
||||
# if running in services mode, keep the file open
|
||||
# in case the docker was so quick it started and finished, check the stop reason
|
||||
if self._services_mode and service_mode_internal_agent_started and stop_reason == 'Service started':
|
||||
return None, None
|
||||
|
||||
# full cleanup (just in case)
|
||||
if process and not self._services_mode:
|
||||
kill_all_child_processes(process.pid)
|
||||
|
||||
stdout.close()
|
||||
if stderr_path:
|
||||
stderr.close()
|
||||
|
Loading…
Reference in New Issue
Block a user