Skip to content

Commit

Permalink
Increased process timeout for prewarming to 5 minutes
Browse files Browse the repository at this point in the history
.. instead of 1 minute
  • Loading branch information
peterjaap authored Mar 26, 2019
1 parent 5e2812a commit 432a1da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Model/Consumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

class Consumer implements ConsumerInterface
{
const PREWARM_PROCESS_TIMEOUT = 300;

/**
* @var LoggerInterface
*/
Expand Down Expand Up @@ -62,11 +64,11 @@ public function process($productId)
}

try {
$process = new Process(sprintf('php %s/bin/magento lcp:prewarm -p %s --force=true', $absolutePath, $productId));
$process = new Process(sprintf('php %s/bin/magento lcp:prewarm -p %s --force=true', $absolutePath, $productId), null, null, null, self::PREWARM_PROCESS_TIMEOUT);
$process->run();
echo $process->getOutput();
} catch (\Exception $e) {
$this->logger->critical($e->getMessage());
}
}
}
}

0 comments on commit 432a1da

Please sign in to comment.