diff --git a/src/Services/BulkService.php b/src/Services/BulkService.php index d277a0d..1966e12 100644 --- a/src/Services/BulkService.php +++ b/src/Services/BulkService.php @@ -21,7 +21,7 @@ public function chunkIterator(int $batchSize, string $key): \Generator } do { - $bulk = Redis::lrange($key, 0, $batchSize); + $bulk = Redis::lrange($key, 0, \max($batchSize - 1, 0)); $count = \count($bulk); if ($count) { yield $bulk;