Continuing development

This commit is contained in:
Louis Vézina 2018-10-16 16:00:55 -04:00
parent 67b722cce1
commit c0276d32c1
4 changed files with 11 additions and 3 deletions

View File

@ -1,6 +1,8 @@
from get_argv import config_dir from get_argv import config_dir
from get_settings import get_general_settings from get_settings import get_general_settings
from scheduler import shutdown_scheduler
from main import restart
import os import os
import logging import logging
@ -48,5 +50,8 @@ def updated():
conn.commit() conn.commit()
c.close() c.close()
from main import restart # Shutdown the scheduler waiting for jobs to finish
shutdown_scheduler()
# Restart Bazarr
restart() restart()

View File

@ -80,3 +80,6 @@ if integration[12] is True or integration[13] is True:
sonarr_full_update() sonarr_full_update()
radarr_full_update() radarr_full_update()
scheduler.start() scheduler.start()
def shutdown_scheduler():
scheduler.shutdown(wait=True)

View File

@ -182,7 +182,7 @@
% from get_settings import get_general_settings % from get_settings import get_general_settings
% ip = get_general_settings()[0] % ip = get_general_settings()[0]
% port = get_general_settings()[1] % port = get_general_settings()[1]
% base_url = get_general_settings()[2] + "/" % base_url = get_general_settings()[2]
if ("{{ip}}" == "0.0.0.0") { if ("{{ip}}" == "0.0.0.0") {
public_ip = window.location.hostname; public_ip = window.location.hostname;

View File

@ -238,7 +238,7 @@
% from get_settings import get_general_settings % from get_settings import get_general_settings
% ip = get_general_settings()[0] % ip = get_general_settings()[0]
% port = get_general_settings()[1] % port = get_general_settings()[1]
% base_url = get_general_settings()[2] + "/" % base_url = get_general_settings()[2]
if ("{{ip}}" == "0.0.0.0") { if ("{{ip}}" == "0.0.0.0") {
public_ip = window.location.hostname; public_ip = window.location.hostname;