mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
[enh] display current number of tasks in logs
This commit is contained in:
parent
fdaa462a84
commit
256de8fb3d
1 changed files with 6 additions and 0 deletions
6
run.py
6
run.py
|
@ -908,6 +908,11 @@ async def html_index(request):
|
||||||
return {'relative_path_to_root': '', 'path': request.path}
|
return {'relative_path_to_root': '', 'path': request.path}
|
||||||
|
|
||||||
|
|
||||||
|
@always_relaunch(sleep=2)
|
||||||
|
async def number_of_tasks():
|
||||||
|
print("Number of tasks: %s" % len(Task.all_tasks()))
|
||||||
|
|
||||||
|
|
||||||
@app.route('/monitor')
|
@app.route('/monitor')
|
||||||
async def monitor(request):
|
async def monitor(request):
|
||||||
snapshot = tracemalloc.take_snapshot()
|
snapshot = tracemalloc.take_snapshot()
|
||||||
|
@ -971,6 +976,7 @@ def main(path_to_analyseCI, ssl=False, keyfile_path="/etc/yunohost/certs/ci-apps
|
||||||
app.add_task(launch_monthly_job(type=type))
|
app.add_task(launch_monthly_job(type=type))
|
||||||
|
|
||||||
app.add_task(jobs_dispatcher())
|
app.add_task(jobs_dispatcher())
|
||||||
|
app.add_task(number_of_tasks())
|
||||||
|
|
||||||
if not ssl:
|
if not ssl:
|
||||||
app.run('localhost', port=port, debug=debug)
|
app.run('localhost', port=port, debug=debug)
|
||||||
|
|
Loading…
Add table
Reference in a new issue