fix(playout): add thread names (#2056)

This commit is contained in:
Jonas L 2022-08-14 19:55:39 +02:00 committed by GitHub
parent 6d928d9b24
commit a730c1b1a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 0 deletions

View File

@ -27,6 +27,8 @@ class RabbitConsumer(ConsumerMixin):
class PypoMessageHandler(Thread):
name = "message_handler"
def __init__(self, pq, rq, config: RabbitMQConfig):
Thread.__init__(self)
self.pypo_queue = pq

View File

@ -30,6 +30,8 @@ signal.signal(signal.SIGINT, keyboardInterruptHandler)
class PypoFetch(Thread):
name = "fetch"
def __init__(
self,
pypoFetch_q,

View File

@ -11,6 +11,8 @@ from requests.exceptions import ConnectionError, HTTPError, Timeout
class PypoFile(Thread):
name = "file"
def __init__(self, schedule_queue, api_client: ApiClient):
Thread.__init__(self)
self.media_queue = schedule_queue

View File

@ -21,6 +21,8 @@ def is_file(media_item):
class PypoPush(Thread):
name = "push"
def __init__(self, q, telnet_lock, pypo_liquidsoap, config: Config):
Thread.__init__(self)
self.queue = q

View File

@ -19,6 +19,8 @@ signal.signal(signal.SIGINT, keyboardInterruptHandler)
class PypoLiqQueue(Thread):
name = "liquidsoap_queue"
def __init__(self, q, pypo_liquidsoap):
Thread.__init__(self)
self.queue = q

View File

@ -36,6 +36,8 @@ def getDateTimeObj(time):
class ShowRecorder(Thread):
name = "show_recorder"
def __init__(
self,
show_instance,

View File

@ -5,6 +5,8 @@ from .player import fetch
def __timeout(func, timeout_duration, default, args, kwargs):
class InterruptableThread(threading.Thread):
name = "liquidsoap_timeout"
def __init__(self):
threading.Thread.__init__(self)
self.result = default