Don't share state between StatsCollector instances! Fixes #30.

This commit is contained in:
James Muscat committed 2015-07-02 15:31:04 +01:00
1 parent 99871b8631
commit 103846d42a
1 file changed
+8 -9
+8 -9
View File
@@ -13,18 +13,17 @@ class StatsCollector(Thread):
you choose, up to one hour.
'''
max_minutes = 60
current = {}
history = {}
lock = Lock()
starttime = 0
def __init__(self):
super(StatsCollector, self).__init__()
self.daemon = True
self.max_minutes = 60
self.current = {}
self.history = {}
self.lock = Lock()
self.starttime = 0
def run(self):
self.starttime = datetime.utcnow()