From e038413f435c76da384e81a08adf494628882ad9 Mon Sep 17 00:00:00 2001 From: Prashant Kanse Date: Wed, 10 Apr 2024 08:07:10 -0400 Subject: [PATCH] DGI9-522 : Fix progress_halted and remaining item issue --- src/FixityCheckBatchCheck.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/FixityCheckBatchCheck.php b/src/FixityCheckBatchCheck.php index eb7f373..4260f78 100644 --- a/src/FixityCheckBatchCheck.php +++ b/src/FixityCheckBatchCheck.php @@ -187,9 +187,10 @@ class FixityCheckBatchCheck { static::check($files, $force, $results); $sandbox['offset'] = $end; - $remaining = $storage->countPeriodic(); + $remaining = $storage->countPeriodic() - $end; + $progress_halted = $sandbox['remaining'] == $remaining; - $sandbox['remaining'] = $remaining; + $sandbox['remaining'] = $storage->countPeriodic(); // End when we have exhausted all inputs or progress has halted. $context['finished'] = empty($files) || $progress_halted;