mirror of
https://github.com/EDCD/EDDN.git
synced 2026-11-22 01:46:44 +03:00
Don't share state between StatsCollector instances! Fixes #30.
This commit is contained in:
1 parent
99871b8631
commit
103846d42a
1 file changed
+8
-9
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user