Refactor samples gallery
Signed-off-by: Felipe Cardoso <felipe.cardoso@hotmail.it>
This commit is contained in:
@@ -191,7 +191,7 @@ class SampleManager:
|
||||
# Wait a bit before retrying on error
|
||||
await asyncio.sleep(5)
|
||||
|
||||
async def list_samples(self, limit: int = 20, offset: int = 0) -> List[Sample]:
|
||||
async def list_samples(self, limit: int = 200, offset: int = 0) -> List[Sample]:
|
||||
"""List sample images with pagination"""
|
||||
logger.info(f"Total samples: {len(self.samples)}")
|
||||
|
||||
@@ -204,7 +204,7 @@ class SampleManager:
|
||||
|
||||
return sorted_samples[offset:offset + limit]
|
||||
|
||||
async def get_latest_samples(self, count: int = 5) -> List[Sample]:
|
||||
async def get_latest_samples(self, count: int = 20) -> List[Sample]:
|
||||
"""Get most recent samples"""
|
||||
return await self.list_samples(limit=count, offset=0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user