fix run sync_redis_state on startup

This commit is contained in:
simon 2021-10-04 01:07:15 +07:00
parent b0fb2bbb00
commit 7e0abc0d20

View File

@ -8,6 +8,13 @@ from home.src.helper import RedisArchivist
from home.src.index_management import index_check from home.src.index_management import index_check
def sync_redis_state():
"""make sure redis gets new config.json values"""
print("sync redis")
config_handler = ArchivistConfig()
config_handler.load_new_defaults()
def make_folders(): def make_folders():
"""make needed cache folders here so docker doesn't mess it up""" """make needed cache folders here so docker doesn't mess it up"""
folders = ["download", "channels", "videos", "import", "backup"] folders = ["download", "channels", "videos", "import", "backup"]
@ -39,4 +46,5 @@ class HomeConfig(AppConfig):
def ready(self): def ready(self):
release_lock() release_lock()
index_check() index_check()
sync_redis_state()
make_folders() make_folders()