From 04438c1dad87646dba82bfc23d1f5e4f9f17a45b Mon Sep 17 00:00:00 2001 From: Simon Prickett Date: Mon, 27 Jun 2022 17:25:03 +0100 Subject: [PATCH] Fixed page size problem with `all()` The default page size for `all` is supposed to be 1000 not 10, for performance reasons. When I changed the constant `DEFAULT_PAGE_SIZE` a while back, I seem to have forgotten to have changed it here. This fixes that. --- aredis_om/model/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aredis_om/model/model.py b/aredis_om/model/model.py index 92bb6f9a..b4f82882 100644 --- a/aredis_om/model/model.py +++ b/aredis_om/model/model.py @@ -754,7 +754,7 @@ async def first(self): raise NotFoundError() return results[0] - async def all(self, batch_size=10): + async def all(self, batch_size=DEFAULT_PAGE_SIZE): if batch_size != self.page_size: query = self.copy(page_size=batch_size, limit=batch_size) return await query.execute()