Skip to content
Snippets Groups Projects
Commit bfca6f25 authored by ale's avatar ale
Browse files

now that all the session workflows are safe, revert to autoflush=True

parent 49c4b7df
No related branches found
No related tags found
No related merge requests found
...@@ -100,7 +100,7 @@ class StateDatabase(object): ...@@ -100,7 +100,7 @@ class StateDatabase(object):
self.codec = codec self.codec = codec
self.engine = sa.create_engine('sqlite:///' + path) self.engine = sa.create_engine('sqlite:///' + path)
self.session = sessionmaker(bind=self.engine, autoflush=False) self.session = sessionmaker(bind=self.engine)
Base.metadata.create_all(self.engine) Base.metadata.create_all(self.engine)
@property @property
...@@ -265,7 +265,10 @@ class StatsThread(threading.Thread): ...@@ -265,7 +265,10 @@ class StatsThread(threading.Thread):
def run(self): def run(self):
while not self._stop.isSet(): while not self._stop.isSet():
self._stop.wait(10) self._stop.wait(10)
try:
self.sm.compute_stats() self.sm.compute_stats()
except:
pass
class StateMachine(object): class StateMachine(object):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment