mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
[mod] async file reading
This commit is contained in:
parent
6d85d76746
commit
ef47728842
1 changed files with 2 additions and 2 deletions
4
run.py
4
run.py
|
@ -214,8 +214,8 @@ async def api_new_job(request):
|
||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
async def index(request):
|
async def index(request):
|
||||||
return response.html(open("./templates/index.html", "r").read())
|
async with aiofiles.open("./templates/index.html", mode="r") as index_template:
|
||||||
# return await render_template("index.html", jobs=Job.select().order_by("id"))
|
return response.html(await index_template.read())
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Add table
Reference in a new issue