satisfy pycodestyle checker

This commit is contained in:
Wolfgang Hottgenroth
2022-02-22 14:58:11 +01:00
parent 9e28ffacde
commit 4b8a15b454
8 changed files with 27 additions and 27 deletions

View File

@ -4,11 +4,12 @@ from AbstractDataObject import AbstractDataObject
import json
import datetime
class StatisticsDataObject(AbstractDataObject):
def __init__(self, topic, payload):
super().__init__(topic)
self.payload = payload
def getPayload(self):
return json.dumps(self.payload)
@ -27,7 +28,7 @@ class StatisticsCollector(threading.Thread):
self.stats = {
'opcUaRequests': 0,
'opcUaErrors' : 0,
'opcUaErrors': 0,
'opcUaTimeouts': 0,
'mqttRequests': 0,
'mqttErrors': 0,
@ -36,10 +37,10 @@ class StatisticsCollector(threading.Thread):
def incOpcUaRequests(self):
self.stats['opcUaRequests'] += 1
def incOpcUaErrors(self):
self.stats['opcUaErrors'] += 1
def incOpcUaTimeouts(self):
self.stats['opcUaTimeouts'] += 1
@ -63,4 +64,3 @@ class StatisticsCollector(threading.Thread):
self.stats['uptime'] = int((currentTime - startTime).total_seconds())
self.queue.put(StatisticsDataObject(self.topic, self.stats))
self.killEvent.wait(timeout=float(self.period))