diff --git a/src/qseek/images/images.py b/src/qseek/images/images.py index 74771ded..9b3eb44e 100644 --- a/src/qseek/images/images.py +++ b/src/qseek/images/images.py @@ -112,6 +112,10 @@ async def worker() -> None: "start pre-processing images, queue size %d", self._queue.maxsize ) async for batch in batch_iterator: + if batch.is_empty(): + logger.debug("empty batch, skipping") + continue + start_time = datetime_now() images = await self.process_traces(batch.traces) stats.time_per_batch = datetime_now() - start_time