Change config method & default timeout to null to disable.

This commit is contained in:
James Ayers 2018-10-25 21:59:20 +13:00
parent d964214822
commit cb3d3209bb

View File

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