Rename my bootiful threadlocalise.. SupervisorBaseMixin method

This commit is contained in:
Kristóf Tóth 2018-05-30 14:07:40 +02:00
parent babb14288c
commit 73f6c6635b
2 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ class LogMonitor(ObserverMixin):
class SendLogWatchdogEventHandler(PatternMatchingWatchdogEventHandler, SupervisorLogMixin):
def __init__(self, process_name, log_tail=0):
self.threadlocalise_supervisor_instance()
self.acquire_own_supervisor_instance() # This thread-localises the xmlrpc client
self.process_name = process_name
self.procinfo = self.supervisor.getProcessInfo(self.process_name)
super().__init__([self.procinfo['stdout_logfile'], self.procinfo['stderr_logfile']])

View File

@ -16,9 +16,9 @@ def get_supervisor_instance():
class SupervisorBaseMixin:
supervisor = get_supervisor_instance()
def threadlocalise_supervisor_instance(self):
def acquire_own_supervisor_instance(self):
"""
Give this instance non-static, thread local xmlrpc client
Give this instance non-static, local xmlrpc client
"""
self.supervisor = get_supervisor_instance()