Set local process timeout to a higher value

This commit is contained in:
Martin Abraham 2015-01-21 22:29:34 +01:00
parent a0ca5f9048
commit 592e132baa

View File

@ -11,6 +11,8 @@ use Symfony\Component\Process\Process;
class Local implements ServerInterface class Local implements ServerInterface
{ {
const TIMEOUT = 300;
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
@ -25,7 +27,10 @@ class Local implements ServerInterface
public function run($command) public function run($command)
{ {
$process = new Process($command); $process = new Process($command);
$process->mustRun(); $process
->setTimeout(self::TIMEOUT)
->setIdleTimeout(self::TIMEOUT)
->mustRun();
return $process->getOutput(); return $process->getOutput();
} }