added watchdog exit reasons description

This commit is contained in:
Pavel Muhortov 2024-01-01 17:11:22 +03:00
parent 090c4f70dc
commit bc2498addd

View File

@ -565,11 +565,18 @@ class FFmpeg:
if que: if que:
while True: while True:
while not que.empty(): while not que.empty():
local_logger.debug(msg=que.get()) que_str = que.get()
local_logger.debug(msg=que_str)
trigger = "Delay between the first packet and last packet in the muxing queue"
if re.match(".*" + trigger + ".*", que_str):
Proc.kill(pid)
local_logger.debug(msg='exit by watchdog, reason: ' + trigger)
sleep(sec) sleep(sec)
if que.empty(): if que.empty():
Proc.kill(pid) Proc.kill(pid)
local_logger.debug(msg='exit by watchdog') trigger = "que is empty for " + str(sec) + " seconds"
local_logger.debug(msg='exit by watchdog, reason: ' + trigger)
break break
exit() exit()