From 7a6d84dc20d68f70bc5816a58d6eb8e64edc21f7 Mon Sep 17 00:00:00 2001 From: Egor Svitin Date: Tue, 21 Feb 2023 13:29:26 +0300 Subject: [PATCH] updates --- Dockerfile | 4 +--- configs/config.py | 2 +- update.py | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 672d2e6..33b7c32 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,4 @@ RUN pip install pymongo \ COPY ./ ./ -RUN chmod 777 /app/configs/sources.json -RUN python /app/update.py - +CMD ["python", "update.py"] \ No newline at end of file diff --git a/configs/config.py b/configs/config.py index afc0183..4e31ecc 100644 --- a/configs/config.py +++ b/configs/config.py @@ -51,7 +51,7 @@ class AppConfig: new_config = {"sources": {}} for source in r.json(): new_config["sources"][source["source_name"]] = source - print(dir(new_config)) + with open("./configs/sources.json", "w") as outfile: outfile.write(json.dumps(new_config)) diff --git a/update.py b/update.py index 4a09cc1..c8cf52f 100644 --- a/update.py +++ b/update.py @@ -37,8 +37,6 @@ class Updater: print("Start Updater"); print("Start Configure") self.update_config() - print(dir(config)) - return if hasattr(self.args, 'source') and self.is_source_exists(self.args.source): print("Start source update" + self.args.source) self.parse_source(self.args.source)