CC-5227 - Sometimes Liquidsoap telnet is unresponsive which causes all Pypo threads to block

-restart Liquidsoap if communication fails..
This commit is contained in:
Martin Konecny 2013-06-11 17:26:48 -04:00
parent f164cf0ad4
commit 21c84dcaad
2 changed files with 7 additions and 0 deletions

View file

@ -1,6 +1,8 @@
import threading
import logging
import pypofetch
def __timeout(func, timeout_duration, default, args, kwargs):
class InterruptableThread(threading.Thread):
@ -24,6 +26,7 @@ def __timeout(func, timeout_duration, default, args, kwargs):
fails again then there is something critically wrong..."""
if first_attempt:
#restart liquidsoap
pypofetch.PypoFetch.ref.restart_liquidsoap()
pass
else:
raise Exception("Thread did not terminate")