mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
We don't need that old 'type' either
This commit is contained in:
parent
21514377c4
commit
0fac7c9dee
1 changed files with 5 additions and 6 deletions
11
run.py
11
run.py
|
@ -185,7 +185,7 @@ async def create_job(app_id, repo_url, job_comment=""):
|
||||||
|
|
||||||
|
|
||||||
@always_relaunch(sleep=60 * 5)
|
@always_relaunch(sleep=60 * 5)
|
||||||
async def monitor_apps_lists(type="stable", dont_monitor_git=False):
|
async def monitor_apps_lists(dont_monitor_git=False):
|
||||||
"parse apps lists every hour or so to detect new apps"
|
"parse apps lists every hour or so to detect new apps"
|
||||||
|
|
||||||
# only support github for now :(
|
# only support github for now :(
|
||||||
|
@ -327,7 +327,7 @@ async def monitor_apps_lists(type="stable", dont_monitor_git=False):
|
||||||
|
|
||||||
|
|
||||||
@once_per_day
|
@once_per_day
|
||||||
async def launch_monthly_job(type):
|
async def launch_monthly_job():
|
||||||
today = date.today().day
|
today = date.today().day
|
||||||
|
|
||||||
for repo in Repo.select().where(Repo.random_job_day == today):
|
for repo in Repo.select().where(Repo.random_job_day == today):
|
||||||
|
@ -1111,7 +1111,7 @@ def format_frame(f):
|
||||||
return dict([(k, str(getattr(f, k))) for k in keys])
|
return dict([(k, str(getattr(f, k))) for k in keys])
|
||||||
|
|
||||||
|
|
||||||
def main(path_to_analyseCI, ssl=False, keyfile_path="/etc/yunohost/certs/ci-apps.yunohost.org/key.pem", certfile_path="/etc/yunohost/certs/ci-apps.yunohost.org/crt.pem", type="stable", dont_monitor_apps_list=False, dont_monitor_git=False, no_monthly_jobs=False, port=4242, base_url="", debug=False):
|
def main(path_to_analyseCI, ssl=False, keyfile_path="/etc/yunohost/certs/ci-apps.yunohost.org/key.pem", certfile_path="/etc/yunohost/certs/ci-apps.yunohost.org/crt.pem", dont_monitor_apps_list=False, dont_monitor_git=False, no_monthly_jobs=False, port=4242, base_url="", debug=False):
|
||||||
if not os.path.exists(path_to_analyseCI):
|
if not os.path.exists(path_to_analyseCI):
|
||||||
print(f"Error: analyseCI script doesn't exist at '{path_to_analyseCI}'")
|
print(f"Error: analyseCI script doesn't exist at '{path_to_analyseCI}'")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -1126,11 +1126,10 @@ def main(path_to_analyseCI, ssl=False, keyfile_path="/etc/yunohost/certs/ci-apps
|
||||||
app.config.base_url = base_url
|
app.config.base_url = base_url
|
||||||
|
|
||||||
if not dont_monitor_apps_list:
|
if not dont_monitor_apps_list:
|
||||||
app.add_task(monitor_apps_lists(type=type,
|
app.add_task(monitor_apps_lists(dont_monitor_git=dont_monitor_git))
|
||||||
dont_monitor_git=dont_monitor_git))
|
|
||||||
|
|
||||||
if not no_monthly_jobs:
|
if not no_monthly_jobs:
|
||||||
app.add_task(launch_monthly_job(type=type))
|
app.add_task(launch_monthly_job())
|
||||||
|
|
||||||
app.add_task(jobs_dispatcher())
|
app.add_task(jobs_dispatcher())
|
||||||
app.add_task(number_of_tasks())
|
app.add_task(number_of_tasks())
|
||||||
|
|
Loading…
Add table
Reference in a new issue