update run

This commit is contained in:
Egor Svitin
2023-02-21 10:04:51 +03:00
parent f167b1e5a2
commit ecb3166dfe
2 changed files with 9 additions and 7 deletions

View File

@@ -13,4 +13,5 @@ RUN pip install pymongo \
COPY ./ ./
RUN chmod 777 /app/configs/sources.json
RUN python /app/update.py

View File

@@ -35,16 +35,17 @@ class Updater:
def do_action(self):
print("Start Updater");
if self.args.config:
print("Start Configure")
self.update_config()
print("Start Configure")
self.update_config()
if not self.is_source_exists(self.args.source):
print("This source not exists, list of sources: " + ', '.join(config.get_sources_list()))
if self.is_source_exists(self.args.source):
print("Start source update" + self.args.source)
self.parse_source(self.args.source)
return
print("Start source update")
self.parse_source(self.args.source)
for source in self.args.source:
print("Start source update" + source)
self.parse_source(source)
updater = Updater()