Don't loop endlessly on shutdown/restart
This commit is contained in:
@@ -70,17 +70,20 @@ class Core(Plugin):
|
|||||||
|
|
||||||
fireEvent('app.shutdown')
|
fireEvent('app.shutdown')
|
||||||
|
|
||||||
while 1:
|
loop = True
|
||||||
|
while loop:
|
||||||
still_running = fireEvent('plugin.running')
|
still_running = fireEvent('plugin.running')
|
||||||
|
|
||||||
brk = True
|
if len(still_running) == 0:
|
||||||
|
break
|
||||||
|
|
||||||
|
log.debug('Still running: %s' % still_running)
|
||||||
for running in still_running:
|
for running in still_running:
|
||||||
running = list(set(running) - set(self.ignore_restart))
|
running = list(set(running) - set(self.ignore_restart))
|
||||||
if len(running) > 0:
|
if len(running) > 0:
|
||||||
log.info('Waiting on plugins to finish: %s' % running)
|
log.info('Waiting on plugins to finish: %s' % running)
|
||||||
brk = False
|
else:
|
||||||
|
loop = False
|
||||||
if brk: break
|
|
||||||
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user