Skip to content

Commit 8542054

Browse files
committed
disable log streaming on wait
1 parent f686942 commit 8542054

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

chipflow_lib/steps/silicon.py

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -225,27 +225,28 @@ def submit(self, rtlil_path, *, dry_run=False, wait=False):
225225
# Wait before polling again
226226
# time.sleep(10)
227227
# Attempt to stream logs rather than time.sleep
228-
try:
229-
if stream_event_counter > 1:
230-
logger.warning("Log streaming may have been interrupted. Some logs may be missing.")
231-
logger.warning(f"Check {build_url}")
232-
stream_event_counter += 1
233-
with requests.get(
234-
log_stream_url,
235-
auth=(None, chipflow_api_key),
236-
stream=True
237-
) as log_resp:
238-
if log_resp.status_code == 200:
239-
for line in log_resp.iter_lines():
240-
if line:
241-
print(line.decode("utf-8")) # Print logs in real-time
242-
sys.stdout.flush()
243-
else:
244-
logger.warning(f"Failed to stream logs: {log_resp.text}")
245-
except requests.RequestException as e:
246-
logger.error(f"Error while streaming logs: {e}")
247-
pass
248-
time.sleep(10) # Wait before polling again
228+
229+
# try:
230+
# if stream_event_counter > 1:
231+
# logger.warning("Log streaming may have been interrupted. Some logs may be missing.")
232+
# logger.warning(f"Check {build_url}")
233+
# stream_event_counter += 1
234+
# with requests.get(
235+
# log_stream_url,
236+
# auth=(None, chipflow_api_key),
237+
# stream=True
238+
# ) as log_resp:
239+
# if log_resp.status_code == 200:
240+
# for line in log_resp.iter_lines():
241+
# if line:
242+
# print(line.decode("utf-8")) # Print logs in real-time
243+
# sys.stdout.flush()
244+
# else:
245+
# logger.warning(f"Failed to stream logs: {log_resp.text}")
246+
# except requests.RequestException as e:
247+
# logger.error(f"Error while streaming logs: {e}")
248+
# pass
249+
time.sleep(30) # Wait before polling again
249250
else:
250251
# Log detailed information about the failed request
251252
logger.error(f"Request failed with status code {resp.status_code}")

0 commit comments

Comments
 (0)