Update Process timeout via Config

This commit is contained in:
James Ayers 2018-10-25 12:27:49 +13:00 committed by Robbie Averill
parent 3c23df63c7
commit decd040c55

View File

@ -97,6 +97,13 @@ class SolrReindexImmediateHandler extends SolrReindexBase
// Execute script via shell
$process = new Process($cmd);
// Set timeout from config. Process default is 60 seconds.
$timeout = Config::inst()->get(static::class, 'process_timeout');
if ($timeout) {
$process->setTimeout($timeout);
}
$process->inheritEnvironmentVariables();
$process->run();