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:
Will Smart 2025-01-11 17:12:06 -05:00 committed by GitHub
parent 4c26fb197a
commit 6255e490c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -165,12 +165,14 @@ async def start(request):
@routes.get(config.URL_PREFIX + 'history')
async def history(request):
history = { 'done': [], 'queue': []}
history = { 'done': [], 'queue': [], 'pending': []}
for _ ,v in dqueue.queue.saved_items():
history['queue'].append(v)
for _ ,v in dqueue.done.saved_items():
history['done'].append(v)
for _ ,v in dqueue.pending.saved_items():
history['pending'].append(v)
return web.Response(text=serializer.encode(history))