Skip to content

Commit

Permalink
DDST-58: Processing till exhaustion
Browse files Browse the repository at this point in the history
  • Loading branch information
axelerant-hardik committed May 7, 2024
1 parent 4c7d49e commit 2251ea9
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/Commands/RebuildOaiEntries.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,9 @@ public function rebuildBatch(int $batch_size, &$context) {
return;
}

$start = $context['sandbox']['processed_items'];
$end = $start + $batch_size;
$end = min($end, $context['sandbox']['total_items']);

while ($context['sandbox']['processed_items'] < $end) {
rest_oai_pmh_process_queue($item);
$context['sandbox']['processed_items']++;
}
// Process queue items.
rest_oai_pmh_process_queue($item);
$context['sandbox']['processed_items']++;

// Set the batch progress percentage.
$context['finished'] = $context['sandbox']['processed_items'] / $context['sandbox']['total_items'];
Expand Down

0 comments on commit 2251ea9

Please sign in to comment.