File tree Expand file tree Collapse file tree
components/job-orchestration/job_orchestration/executor/query Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,13 +89,6 @@ def sigterm_handler(_signo, _stack_frame):
8989 stdout_data , _ = task_proc .communicate ()
9090 return_code = task_proc .returncode
9191
92- # Dump the stderr log so it's visible in container logs
93- if clo_log_path .stat ().st_size > 0 :
94- logger .error (
95- f"Contents of { clo_log_path .name } :\n "
96- f"{ clo_log_path .read_text ()} "
97- )
98-
9992 if 0 != return_code :
10093 task_status = QueryTaskStatus .FAILED
10194 logger .error (
@@ -106,6 +99,12 @@ def sigterm_handler(_signo, _stack_frame):
10699 logger .info (f"{ task_name } task { task_id } completed for job { job_id } " )
107100
108101 clo_log_file .close ()
102+ # Dump the stderr log so it's visible in container logs
103+ if clo_log_path .stat ().st_size > 0 :
104+ logger .error (
105+ f"Contents of { clo_log_path .name } :\n "
106+ f"{ clo_log_path .read_text ()} "
107+ )
109108 duration = (datetime .datetime .now () - start_time ).total_seconds ()
110109
111110 update_query_task_metadata (
You can’t perform that action at this time.
0 commit comments