mirror of
https://github.com/norohind/jubilant-system.git
synced 2026-11-06 01:52:22 +03:00
Fixes in shutdown logic during daemon mode
This commit is contained in:
1 file changed
+8
@@ -197,13 +197,21 @@ if __name__ == '__main__':
|
||||
logger.info('Entering daemon mode')
|
||||
while True:
|
||||
can_be_shutdown = False
|
||||
|
||||
update(amount_to_update=500)
|
||||
if shutting_down:
|
||||
exit(0)
|
||||
|
||||
logger.debug('Updated, sleeping')
|
||||
can_be_shutdown = True
|
||||
time.sleep(30 * 60)
|
||||
can_be_shutdown = False
|
||||
logger.debug('Discovering')
|
||||
|
||||
discover()
|
||||
if shutting_down:
|
||||
exit(0)
|
||||
|
||||
logger.debug('Discovered, sleeping')
|
||||
can_be_shutdown = True
|
||||
time.sleep(30 * 60)
|
||||
|
||||
Reference in new issue
Block a user