satisfy pycodestyle checker
This commit is contained in:
@ -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))
|
||||
|
||||
|
Reference in New Issue
Block a user