Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fashxp authored and github-actions[bot] committed Apr 17, 2024
1 parent c65f252 commit 46564ca
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Command/SequentialProcessQueueCommand.php
Expand Up @@ -78,28 +78,28 @@ protected function execute(InputInterface $input, OutputInterface $output)
try {
$itemIds = $this->queueService->getAllQueueEntryIds(ImportProcessingService::EXECUTION_TYPE_SEQUENTIAL);
$itemCount = count($itemIds);

$output->writeln("Processing {$itemCount} items sequentially\n");

$progressBar = new ProgressBar($output, $itemCount);
$progressBar->start();

foreach ($itemIds as $i => $id) {
$this->importProcessingService->processQueueItem($id);
$progressBar->advance();

// call the garbage collector to avoid too many connections & memory issue
if (($i + 1) % 200 === 0) {
\Pimcore::collectGarbage();
}
}

$progressBar->finish();

$this->release(); //release the lock

$output->writeln("\n\nProcessed {$itemCount} items.");

return 0;
} catch (\Throwable $t) {
$this->release();
Expand Down

0 comments on commit 46564ca

Please sign in to comment.