Skip to content

Commit 04438c1

Browse files
author
Simon Prickett
authored
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 d604797 commit 04438c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aredis_om/model/model.py

Lines changed: 1 addition & 1 deletion
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)