mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-07 15:27:38 +08:00
Simplify daemon mechanism.
This commit is contained in:
parent
2c6a4583d0
commit
b434ff2666
2 changed files with 3 additions and 3 deletions
|
@ -80,6 +80,6 @@ if __name__ == '__main__':
|
|||
while True:
|
||||
check_status()
|
||||
try:
|
||||
time.sleep(1)
|
||||
time.sleep(5)
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
pass
|
||||
|
|
|
@ -222,7 +222,7 @@ def doShutdown():
|
|||
else:
|
||||
stop_file.write(six.text_type(''))
|
||||
stop_file.close()
|
||||
sys.exit(0)
|
||||
os._exit(0)
|
||||
|
||||
|
||||
@route(base_url + 'restart')
|
||||
|
@ -243,7 +243,7 @@ def restart():
|
|||
logging.info('Bazarr is being restarted...')
|
||||
restart_file.write(six.text_type(''))
|
||||
restart_file.close()
|
||||
sys.exit(0)
|
||||
os._exit(0)
|
||||
|
||||
|
||||
@route(base_url + 'wizard')
|
||||
|
|
Loading…
Reference in a new issue