Fix shared xmlrpc client raising HTTP errors in LogMonitor

This commit is contained in:
Kristóf Tóth 2018-05-29 16:11:28 +02:00
parent 9f6418bf60
commit 4815b97200

View File

@ -29,6 +29,7 @@ class LogMonitor(ObserverMixin):
class SendLogWatchdogEventHandler(PatternMatchingWatchdogEventHandler, SupervisorLogMixin):
def __init__(self, process_name):
self.threadlocalise_supervisor_instance()
self.process_name = process_name
self.procinfo = self.supervisor.getProcessInfo(self.process_name)
super().__init__([self.procinfo['stdout_logfile'], self.procinfo['stderr_logfile']])
@ -41,9 +42,9 @@ class SendLogWatchdogEventHandler(PatternMatchingWatchdogEventHandler, Superviso
@RateLimiter(rate_per_second=5)
def on_modified(self, event):
self.uplink.send({
'key': 'console',
'key': 'processlog',
'data': {
'command': 'writelog',
'command': 'new_log',
'stdout': self.read_stdout(self.process_name),
'stderr': self.read_stderr(self.process_name)
}