delay each check for 5 seconds

This commit is contained in:
deflax 2024-01-12 22:47:59 +02:00
parent 4a9ae58740
commit 69ebfae058

View file

@ -159,6 +159,7 @@ def exec_recorder(stream_id, stream_hls_url):
# Check if the stream_hls_url returns 200
req_counter = 0
while True:
time.sleep(5)
req_counter += 1
if requests.get(stream_hls_url).status_code == 200:
logger_job.warning(f'{stream_hls_url} accessible after {req_counter} attempts.')