fixes in convergence and statemachine
- set spent_inside to 0 on set_target - additional debug log messages in statemachine
This commit is contained in:
@ -186,6 +186,7 @@ class StateMachine:
|
||||
ret = self.state(self)
|
||||
self.init = False
|
||||
if self.stopped:
|
||||
self.log.debug('%r', self.stopped)
|
||||
self.last_error = self.stopped
|
||||
self.cleanup(self)
|
||||
self.stopped = False
|
||||
@ -268,6 +269,7 @@ class StateMachine:
|
||||
self.stopped = Restart
|
||||
with self._lock: # wait for running cycle finished
|
||||
if self.stopped: # cleanup is not yet done
|
||||
self.log.debug('restart')
|
||||
self.last_error = self.stopped
|
||||
self.cleanup(self) # ignore return state on restart
|
||||
self.stopped = False
|
||||
|
Reference in New Issue
Block a user