mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
[mod] rename function for better readability
This commit is contained in:
parent
6aa293b3cd
commit
719cb13c08
1 changed files with 4 additions and 4 deletions
8
run.py
8
run.py
|
@ -688,14 +688,14 @@ async def api_restart_job(request, job_id):
|
||||||
await broadcast({
|
await broadcast({
|
||||||
"action": "update_job",
|
"action": "update_job",
|
||||||
"data": model_to_dict(job),
|
"data": model_to_dict(job),
|
||||||
}, ["jobs", f"job-{job_id}"])
|
}, ["jobs", f"job-{job_id}", f"app-jobs-{job.url_or_path}"])
|
||||||
|
|
||||||
return response.text("ok")
|
return response.text("ok")
|
||||||
|
|
||||||
|
|
||||||
@app.route('/job/<job_id>')
|
@app.route('/job/<job_id>')
|
||||||
@jinja.template('job.html')
|
@jinja.template('job.html')
|
||||||
async def job(request, job_id):
|
async def html_job(request, job_id):
|
||||||
job = Job.select().where(Job.id == job_id)
|
job = Job.select().where(Job.id == job_id)
|
||||||
|
|
||||||
if job.count == 0:
|
if job.count == 0:
|
||||||
|
@ -706,13 +706,13 @@ async def job(request, job_id):
|
||||||
|
|
||||||
@app.route('/apps/')
|
@app.route('/apps/')
|
||||||
@jinja.template('apps.html')
|
@jinja.template('apps.html')
|
||||||
async def apps(request):
|
async def html_apps(request):
|
||||||
return {'relative_path_to_root': '../', 'path': request.path}
|
return {'relative_path_to_root': '../', 'path': request.path}
|
||||||
|
|
||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
@jinja.template('index.html')
|
@jinja.template('index.html')
|
||||||
async def index(request):
|
async def html_index(request):
|
||||||
return {'relative_path_to_root': '', 'path': request.path}
|
return {'relative_path_to_root': '', 'path': request.path}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue