Skip to content

Commit

Permalink
Updating default page size to 1000 from 10 (#282)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Simon Prickett authored Aug 9, 2022
1 parent 679a7aa commit 3f91f9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aredis_om/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 3f91f9e

Please sign in to comment.