mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
Revert "I have no idea why, but apparently we can't load the config inside main() now ..."
This reverts commit 688a1fdc8f
.
This commit is contained in:
parent
688a1fdc8f
commit
b89b1edb24
1 changed files with 54 additions and 53 deletions
5
run.py
5
run.py
|
@ -1746,6 +1746,8 @@ async def listener_after_server_stop(*args, **kwargs):
|
|||
job.save()
|
||||
|
||||
|
||||
def main(config="./config.py"):
|
||||
|
||||
default_config = {
|
||||
"BASE_URL": "",
|
||||
"PORT": 4242,
|
||||
|
@ -1781,7 +1783,7 @@ default_config = {
|
|||
}
|
||||
|
||||
app.config.update_config(default_config)
|
||||
app.config.update_config("./config.py")
|
||||
app.config.update_config(config)
|
||||
|
||||
app.config.PACKAGE_CHECK_PATH = app.config.PACKAGE_CHECK_DIR + "package_check.sh"
|
||||
app.config.PACKAGE_CHECK_LOCK_PER_WORKER = (
|
||||
|
@ -1803,7 +1805,6 @@ if not os.path.exists(app.config.PACKAGE_CHECK_PATH):
|
|||
)
|
||||
sys.exit(1)
|
||||
|
||||
def main():
|
||||
if app.config.MONITOR_APPS_LIST:
|
||||
app.add_task(
|
||||
monitor_apps_lists(
|
||||
|
|
Loading…
Add table
Reference in a new issue