mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
Update Process timeout via Config
This commit is contained in:
parent
3c23df63c7
commit
decd040c55
@ -97,6 +97,13 @@ 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.
|
||||||
|
$timeout = Config::inst()->get(static::class, 'process_timeout');
|
||||||
|
if ($timeout) {
|
||||||
|
$process->setTimeout($timeout);
|
||||||
|
}
|
||||||
|
|
||||||
$process->inheritEnvironmentVariables();
|
$process->inheritEnvironmentVariables();
|
||||||
$process->run();
|
$process->run();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user