summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLouis Vézina <[email protected]>2020-04-15 12:54:07 -0400
committerLouis Vézina <[email protected]>2020-04-15 12:54:07 -0400
commitb434ff2666b1887dbeba85a0d6461195582f103d (patch)
tree57d56a7181ead622596d3880d3df0550cbfad019
parent2c6a4583d001528002b02e71bbf01586c3671007 (diff)
downloadbazarr-b434ff2666b1887dbeba85a0d6461195582f103d.tar.gz
bazarr-b434ff2666b1887dbeba85a0d6461195582f103d.zip
Simplify daemon mechanism.
-rw-r--r--bazarr.py2
-rw-r--r--bazarr/main.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/bazarr.py b/bazarr.py
index 30aa26755..d4929937a 100644
--- a/bazarr.py
+++ b/bazarr.py
@@ -80,6 +80,6 @@ if __name__ == '__main__':
while True:
check_status()
try:
- time.sleep(1)
+ time.sleep(5)
except (KeyboardInterrupt, SystemExit):
pass
diff --git a/bazarr/main.py b/bazarr/main.py
index b12c2c543..13f7ef189 100644
--- a/bazarr/main.py
+++ b/bazarr/main.py
@@ -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')