From df3cbb27817a12b1beb79620be0197d8749646d4 Mon Sep 17 00:00:00 2001 From: deflax Date: Sat, 13 Jan 2024 03:45:12 +0200 Subject: [PATCH] hack a sleep so we can recieve a proper hls stream --- src/scheduler/app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scheduler/app.py b/src/scheduler/app.py index d42511f..97079c1 100644 --- a/src/scheduler/app.py +++ b/src/scheduler/app.py @@ -158,6 +158,8 @@ def exec_recorder(stream_id, stream_hls_url): req_counter += 1 if requests.get(stream_hls_url).status_code == 200: logger_job.warning(f'{stream_hls_url} accessible after {req_counter} attempts.') + # TODO: Wait at least 12 seconds so we wont have broken video. This could be done better... + time.sleep(12) break if req_counter == 30: logger_job.error(f'Recording cancelled after {req_counter} attempts.')