From 394a73bbcec21fd2971eb338db8bdbd1d20e3cfc Mon Sep 17 00:00:00 2001 From: Ernest Feret Date: Thu, 23 Jul 2020 14:05:03 +0200 Subject: [PATCH] modify pagination to default 1000 items page size --- rq_mantis/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rq_mantis/utils.py b/rq_mantis/utils.py index 224ad17..a5234e3 100644 --- a/rq_mantis/utils.py +++ b/rq_mantis/utils.py @@ -9,7 +9,7 @@ QueueData = namedtuple('QueueData', ('queue', 'workers', 'running_jobs')) -def get_paginated_jobs(jobs, offset=0, per_page=10): +def get_paginated_jobs(jobs, offset=0, per_page=1000): return sorted(jobs, key=get_created_at, reverse=True)[offset: offset + per_page]