mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
[fix] menu path to apps wasn't relative
This commit is contained in:
parent
daaa26b8aa
commit
380c7ce501
2 changed files with 11 additions and 1 deletions
10
run.py
10
run.py
|
@ -212,11 +212,13 @@ async def monitor_apps_lists(type="stable"):
|
||||||
# already know, look to see if there is new commits
|
# already know, look to see if there is new commits
|
||||||
if app_id in repos:
|
if app_id in repos:
|
||||||
repo = repos[app_id]
|
repo = repos[app_id]
|
||||||
|
repo_is_updated = False
|
||||||
if repo.revision != commit_sha:
|
if repo.revision != commit_sha:
|
||||||
task_logger.info(f"Application {app_id} has new commits on github "
|
task_logger.info(f"Application {app_id} has new commits on github "
|
||||||
f"({repo.revision} → {commit_sha}), schedule new job")
|
f"({repo.revision} → {commit_sha}), schedule new job")
|
||||||
repo.revision = commit_sha
|
repo.revision = commit_sha
|
||||||
repo.save()
|
repo.save()
|
||||||
|
repo_is_updated = True
|
||||||
|
|
||||||
await create_job(app_id, app_list_name, repo, job_command_last_part)
|
await create_job(app_id, app_list_name, repo, job_command_last_part)
|
||||||
|
|
||||||
|
@ -225,10 +227,18 @@ async def monitor_apps_lists(type="stable"):
|
||||||
if repo.state != repo_state:
|
if repo.state != repo_state:
|
||||||
repo.state = repo_state
|
repo.state = repo_state
|
||||||
repo.save()
|
repo.save()
|
||||||
|
repo_is_updated = True
|
||||||
|
|
||||||
if repo.random_job_day is None:
|
if repo.random_job_day is None:
|
||||||
repo.random_job_day = random.randint(1, 28)
|
repo.random_job_day = random.randint(1, 28)
|
||||||
repo.save()
|
repo.save()
|
||||||
|
repo_is_updated = True
|
||||||
|
|
||||||
|
if repo_is_updated:
|
||||||
|
await broadcast({
|
||||||
|
"action": "update_app",
|
||||||
|
"data": model_to_dict(repo),
|
||||||
|
}, "apps")
|
||||||
|
|
||||||
# new app
|
# new app
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
Home
|
Home
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a class="navbar-item" href="<{ relative_path_to_root }>/apps/">
|
<a class="navbar-item" href="<{ relative_path_to_root }>apps/">
|
||||||
Apps
|
Apps
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue