cancel recording after 20 attempts
This commit is contained in:
parent
39ab8c23d2
commit
4a9ae58740
1 changed files with 4 additions and 1 deletions
|
@ -163,6 +163,9 @@ def exec_recorder(stream_id, stream_hls_url):
|
|||
if requests.get(stream_hls_url).status_code == 200:
|
||||
logger_job.warning(f'{stream_hls_url} accessible after {req_counter} attempts.')
|
||||
break
|
||||
if req_counter == 20:
|
||||
logger_job.error(f'Recording cancelled after {req_counter} attempts.')
|
||||
return False
|
||||
logger_job.warning(f'Starting recording job for {output_file}')
|
||||
rechead = stream_id
|
||||
ffmpeg = (
|
||||
|
|
Loading…
Reference in a new issue