This commit is contained in:
Egor Svitin
2023-02-21 13:29:26 +03:00
parent 637fafff5e
commit 7a6d84dc20
3 changed files with 2 additions and 6 deletions

View File

@@ -12,6 +12,4 @@ RUN pip install pymongo \
COPY ./ ./ COPY ./ ./
RUN chmod 777 /app/configs/sources.json CMD ["python", "update.py"]
RUN python /app/update.py

View File

@@ -51,7 +51,7 @@ class AppConfig:
new_config = {"sources": {}} new_config = {"sources": {}}
for source in r.json(): for source in r.json():
new_config["sources"][source["source_name"]] = source new_config["sources"][source["source_name"]] = source
print(dir(new_config))
with open("./configs/sources.json", "w") as outfile: with open("./configs/sources.json", "w") as outfile:
outfile.write(json.dumps(new_config)) outfile.write(json.dumps(new_config))

View File

@@ -37,8 +37,6 @@ class Updater:
print("Start Updater"); print("Start Updater");
print("Start Configure") print("Start Configure")
self.update_config() self.update_config()
print(dir(config))
return
if hasattr(self.args, 'source') and self.is_source_exists(self.args.source): if hasattr(self.args, 'source') and self.is_source_exists(self.args.source):
print("Start source update" + self.args.source) print("Start source update" + self.args.source)
self.parse_source(self.args.source) self.parse_source(self.args.source)