Prevent saving the storing of state on every moment

This commit is contained in:
Ruben van de Ven 2019-11-15 16:26:28 +01:00
parent 00cf85ec01
commit bb7020288d

View file

@ -1766,7 +1766,7 @@ class Story(object):
# Test stability of Central Command with deliberate crash # Test stability of Central Command with deliberate crash
# if self.timer.getElapsed() > 10: # if self.timer.getElapsed() > 10:
# raise Exception("Test exception") # raise Exception("Test exception")
if not self.timer.hasMark('state_save') or self.timer.getElapsed('state_save') > 5: if not self.timer.hasMark('state_save') or self.timer.getElapsed('state_save') > 45:
self.storeState() self.storeState()
self.timer.setMark('state_save') self.timer.setMark('state_save')
@ -1863,8 +1863,8 @@ class Story(object):
self.logger.log(LOG_BS,logmsg) self.logger.log(LOG_BS,logmsg)
if message.id != self.startMessage.id: # if message.id != self.startMessage.id:
self.storeState() # self.storeState()
def fadeLightPreset(self, presetNr: int): def fadeLightPreset(self, presetNr: int):
if presetNr < 0 or presetNr > 4: if presetNr < 0 or presetNr > 4: