mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
[enh] always relaunch monitor_apps_lists
This commit is contained in:
parent
cfda7c79b0
commit
faf1379094
1 changed files with 2 additions and 3 deletions
5
run.py
5
run.py
|
@ -26,6 +26,7 @@ from sanic_jinja2 import SanicJinja2
|
|||
from playhouse.shortcuts import model_to_dict
|
||||
|
||||
from models import Repo, Job, db, Worker
|
||||
from schedule import always_relaunch
|
||||
|
||||
LOGGING_CONFIG_DEFAULTS["loggers"] = {
|
||||
"task": {
|
||||
|
@ -130,6 +131,7 @@ async def create_job(app_id, app_list_name, repo, job_command_last_part):
|
|||
}, "jobs")
|
||||
|
||||
|
||||
@always_relaunch(sleep=60 * 5)
|
||||
async def monitor_apps_lists(type="stable"):
|
||||
"parse apps lists every hour or so to detect new apps"
|
||||
|
||||
|
@ -198,9 +200,6 @@ async def monitor_apps_lists(type="stable"):
|
|||
|
||||
await asyncio.sleep(3)
|
||||
|
||||
await asyncio.sleep(5 * 60)
|
||||
asyncio.ensure_future(monitor_apps_lists())
|
||||
|
||||
|
||||
async def launch_monthly_job(type):
|
||||
# XXX DRY
|
||||
|
|
Loading…
Add table
Reference in a new issue