CC-5227 - Sometimes Liquidsoap telnet is unresponsive which causes all Pypo threads to block
-restart Liquidsoap if communication fails..
This commit is contained in:
parent
f164cf0ad4
commit
21c84dcaad
2 changed files with 7 additions and 0 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue