This `sleep(5)` should be initiated *after* the lock is released.
Otherwise, it can cause troubles with the reporter loop which can
never acquire the lock.
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit
06a4a637b5988a1b6d7bae5d74ae140ff9ba83b6)
executor.map(lambda f: f(), update_funcs)
self.data_ready = True
- sleep(5)
except RuntimeError as e:
self.run = False
self.log.logger.error(f'Error detected, trying to gracefully log out from redfish api.\n{e}')
self.client.logout()
finally:
self.lock.release()
+ sleep(5)
self.log.logger.debug('lock released in the update loop.')
def flush(self) -> None: