Skip to content

Commit a50a401

Browse files
TheRealHaoLiuGabriel Muniz
andcommitted
differentiate timeout vs idle timeout
currently idle timeout and timeout result in the same status call back this result in the AWX not being able to parse the differences between the two failure condition and make it confusing to debg Co-Authored-By: Gabriel Muniz <gmuniz@redhat.com>
1 parent a4a981d commit a50a401

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ansible_runner/runner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def _decode(x):
337337
if self.config.idle_timeout and (time.time() - self.last_stdout_update) > self.config.idle_timeout:
338338
self.kill_container()
339339
Runner.handle_termination(child.pid, is_cancel=False)
340-
self.timed_out = True
340+
self.idle_timed_out = True
341341

342342
stdout_handle.close()
343343
stderr_handle.close()
@@ -350,6 +350,8 @@ def _decode(x):
350350
self.status_callback('successful')
351351
elif self.timed_out:
352352
self.status_callback('timeout')
353+
elif self.timed_out:
354+
self.status_callback('idle_timeout')
353355
else:
354356
self.status_callback('failed')
355357

0 commit comments

Comments
 (0)