Rework LogMonitoringEH API to adhere new conventions

This commit is contained in:
Kristóf Tóth 2018-05-31 13:53:11 +02:00
parent 9abd5b72f4
commit b68ceeb394

View File

@ -1,7 +1,6 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details.
from tfw import EventHandlerBase
from tfw.mixins import MonitorManagerMixin
from tfw.config.logs import logging
@ -31,7 +30,7 @@ class LogMonitoringEventHandler(EventHandlerBase, MonitorManagerMixin):
LOG.error('IGNORING MESSAGE: Invalid message received: %s', message)
def handle_process_name(self, data):
self.set_monitor_args(data['process_name'], self.log_tail)
self.set_monitor_args(data['value'], self.log_tail)
def handle_log_tail(self, data):
self.set_monitor_args(self.process_name, data['log_tail'])
self.set_monitor_args(self.process_name, data['value'])