diff --git a/Dockerfile b/Dockerfile index 23d4cf5..672d2e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,5 @@ RUN pip install pymongo \ COPY ./ ./ RUN chmod 777 /app/configs/sources.json +RUN python /app/update.py diff --git a/update.py b/update.py index 5c68fb3..7f11639 100644 --- a/update.py +++ b/update.py @@ -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()