[fix] also include currently running job on index page

This commit is contained in:
Laurent Peuch 2018-11-03 05:30:24 +01:00
parent 6e406eca3f
commit 2b10a70d6d

4
run.py
View file

@ -420,7 +420,9 @@ async def ws_index(request, websocket):
await websocket.send(ujson.dumps({
"action": "init_jobs",
"data": itertools.chain(map(model_to_dict, next_scheduled_jobs), map(model_to_dict, latest_done_jobs)),
"data": itertools.chain(map(model_to_dict, next_scheduled_jobs),
map(model_to_dict, Job.select().where(Job.state == "running")),
map(model_to_dict, latest_done_jobs)),
}))
while True: