Merge pull request #569 from jwsmart/jwsmart-patch-1

Adds 'pending' to response for GET /history
This commit is contained in:
Alex 2025-01-12 12:17:01 +02:00 committed by GitHub
commit 8c3fbe03f6
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))