Browse Source

Reduce amount of 'Waiting on logger' messages sent

Change-Id: If76e730673ac80e254c878c46b17181e14b4a5de
changes/87/777887/2
Albin Vass 4 months ago
parent
commit
6e3b0025f4
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      zuul/ansible/base/callback/zuul_stream.py

+ 5
- 2
zuul/ansible/base/callback/zuul_stream.py View File

@ -132,6 +132,7 @@ class CallbackModule(default.CallbackModule):
def _read_log(self, host, ip, port, log_id, task_name, hosts):
self._log("[%s] Starting to log %s for task %s"
% (host, log_id, task_name), job=False, executor=True)
logger_retries = 0
while True:
try:
s = socket.create_connection((ip, port), 5)
@ -152,8 +153,10 @@ class CallbackModule(default.CallbackModule):
% (ip, port))
return
except Exception:
self._log("[%s] Waiting on logger" % host,
executor=True, debug=True)
if logger_retries % 10 == 0:
self._log("[%s] Waiting on logger" % host,
executor=True, debug=True)
logger_retries += 1
time.sleep(0.1)
continue
msg = "%s\n" % log_id


Loading…
Cancel
Save