fix an issue in app view

This commit is contained in:
Kay0u 2021-06-16 19:24:19 +02:00
parent f60055ae8e
commit 84df910e20
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D
2 changed files with 3 additions and 3 deletions

View file

@ -18,7 +18,7 @@ sanic==21.3.4
sanic-jinja2==0.10.0
sanic-routing==0.6.2
typing-extensions==3.10.0.0
ujson==1.35
ujson==4.0.2
urllib3==1.26.5
uvloop==0.11.3
websockets==8.1

4
run.py
View file

@ -706,10 +706,10 @@ async def ws_app(request, websocket, app_name):
subscribe(websocket, f"app-jobs-{app.url}")
job = list(Job.select().where(Job.url_or_path == app.url).order_by(-Job.id).dicts())
await websocket.send(json.dumps({
"action": "init_jobs",
"data": Job.select().where(Job.url_or_path ==
app.url).order_by(-Job.id),
"data": job,
}, default=datetime_to_epoch_json_converter))
await websocket.wait_closed()