From 2b10a70d6d782024216078a055b6447ca4299e45 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sat, 3 Nov 2018 05:30:24 +0100 Subject: [PATCH] [fix] also include currently running job on index page --- run.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/run.py b/run.py index 9f3e9f6..0f2bde1 100644 --- a/run.py +++ b/run.py @@ -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: