Merge pull request #12 from bivis/develop

run with all params
This commit is contained in:
bivis
2023-02-07 12:21:30 +03:00
committed by GitHub
2 changed files with 6 additions and 7 deletions

View File

@@ -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()

View File

@@ -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()))