From 9b3f910326f5fcc4a43fbc66f660ca0a6510ab83 Mon Sep 17 00:00:00 2001 From: alexpekurovsky Date: Wed, 12 Jul 2017 15:23:01 +0300 Subject: [PATCH] Setting optional limit for done tasks --- redash/handlers/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/redash/handlers/admin.py b/redash/handlers/admin.py index d218f66e..dc9735df 100644 --- a/redash/handlers/admin.py +++ b/redash/handlers/admin.py @@ -32,9 +32,10 @@ def outdated_queries(): @require_super_admin @login_required def queries_tasks(): + limit = request.args.get('limit') or 50 waiting = QueryTaskTracker.all(QueryTaskTracker.WAITING_LIST) in_progress = QueryTaskTracker.all(QueryTaskTracker.IN_PROGRESS_LIST) - done = QueryTaskTracker.all(QueryTaskTracker.DONE_LIST, limit=50) + done = QueryTaskTracker.all(QueryTaskTracker.DONE_LIST, limit=limit) response = { 'waiting': [t.data for t in waiting if t is not None],