From 2615ce4b1d5935d31ee1fe0cb14abbce0c7324a5 Mon Sep 17 00:00:00 2001 From: Egor Svitin Date: Tue, 7 Feb 2023 12:11:39 +0300 Subject: [PATCH] run with all params --- configs/config.py | 8 ++++---- update.py | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/configs/config.py b/configs/config.py index f0cfbf2..62688b8 100644 --- a/configs/config.py +++ b/configs/config.py @@ -9,14 +9,14 @@ from configs.configs import CONFIGS class AppConfig: def __init__(self): - self.refresh() + self.refresh() connect( db=CONFIGS['db']['name'], host="mongodb://{host}:27017/{database}".format(host=CONFIGS['db']['host'], database=CONFIGS['db']['name']) ) - def refresh(self): - self.config = Dynaconf(settings_files=[ + def refresh(self): + self.config = Dynaconf(settings_files=[ "/app/configs/main.json", "/app/configs/sources.json" ]) @@ -52,6 +52,6 @@ class AppConfig: with open("./configs/sources.json", "w") as outfile: outfile.write(json.dumps(new_config)) - self.refresh() + self.refresh() config = AppConfig() \ No newline at end of file diff --git a/update.py b/update.py index 3edb210..5c68fb3 100644 --- a/update.py +++ b/update.py @@ -34,11 +34,10 @@ class Updater: config.update_sources() def do_action(self): - print("Start Updater"); + print("Start Updater"); if self.args.config: - print("Start Configure") + print("Start Configure") self.update_config() - return if not self.is_source_exists(self.args.source): print("This source not exists, list of sources: " + ', '.join(config.get_sources_list()))