Adds 'pending' to response for GET /history
Allows for some additional integration opportunities by including "pending" items in the json reponse to /history.
This commit is contained in:
parent
4c26fb197a
commit
6255e490c7
|
|
@ -165,12 +165,14 @@ async def start(request):
|
||||||
|
|
||||||
@routes.get(config.URL_PREFIX + 'history')
|
@routes.get(config.URL_PREFIX + 'history')
|
||||||
async def history(request):
|
async def history(request):
|
||||||
history = { 'done': [], 'queue': []}
|
history = { 'done': [], 'queue': [], 'pending': []}
|
||||||
|
|
||||||
for _ ,v in dqueue.queue.saved_items():
|
for _ ,v in dqueue.queue.saved_items():
|
||||||
history['queue'].append(v)
|
history['queue'].append(v)
|
||||||
for _ ,v in dqueue.done.saved_items():
|
for _ ,v in dqueue.done.saved_items():
|
||||||
history['done'].append(v)
|
history['done'].append(v)
|
||||||
|
for _ ,v in dqueue.pending.saved_items():
|
||||||
|
history['pending'].append(v)
|
||||||
|
|
||||||
return web.Response(text=serializer.encode(history))
|
return web.Response(text=serializer.encode(history))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue