This commit is contained in:
vvzvlad 2024-08-28 02:24:48 +03:00
parent c5522e8c72
commit c7cc0079a8

View File

@ -49,13 +49,11 @@ def parse_logs(timeout):
return False, "Max Retry Reached" return False, "Max Retry Reached"
except Exception as e: except Exception as e:
print(f"Exception occurred: {e}", flush=True) print(f"Exception occurred: {e}", flush=True)
finally:
process.stdout.close()
print("Sleeping before next log request...", flush=True) print("Sleeping before next log request...", flush=True)
time.sleep(30) time.sleep(30)
if time.time() - start_time > timeout: if time.time() - start_time > timeout * 60:
print(f"Timeout reached: {timeout} minutes elapsed without success.", flush=True) print(f"Timeout reached: {timeout} minutes elapsed without success.", flush=True)
return False, f"Timeout reached: {timeout} minutes elapsed without success." return False, f"Timeout reached: {timeout} minutes elapsed without success."