Skip to content

Commit 3f91f9e

Browse files
author
Simon Prickett
authored
Updating default page size to 1000 from 10 (#282)
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.
1 parent 679a7aa commit 3f91f9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aredis_om/model/model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ async def first(self):
754754
raise NotFoundError()
755755
return results[0]
756756

757-
async def all(self, batch_size=10):
757+
async def all(self, batch_size=DEFAULT_PAGE_SIZE):
758758
if batch_size != self.page_size:
759759
query = self.copy(page_size=batch_size, limit=batch_size)
760760
return await query.execute()

0 commit comments

Comments
 (0)