hack a sleep so we can recieve a proper hls stream
This commit is contained in:
parent
a87a0de943
commit
df3cbb2781
1 changed files with 2 additions and 0 deletions
|
@ -158,6 +158,8 @@ def exec_recorder(stream_id, stream_hls_url):
|
||||||
req_counter += 1
|
req_counter += 1
|
||||||
if requests.get(stream_hls_url).status_code == 200:
|
if requests.get(stream_hls_url).status_code == 200:
|
||||||
logger_job.warning(f'{stream_hls_url} accessible after {req_counter} attempts.')
|
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
|
break
|
||||||
if req_counter == 30:
|
if req_counter == 30:
|
||||||
logger_job.error(f'Recording cancelled after {req_counter} attempts.')
|
logger_job.error(f'Recording cancelled after {req_counter} attempts.')
|
||||||
|
|
Loading…
Reference in a new issue