Skip to content

Commit

Permalink
Update BackgroundCommandMiddleware.php
Browse files Browse the repository at this point in the history
  • Loading branch information
algsupport committed Jul 1, 2022
1 parent 582f8f2 commit 8a4f8fc
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/middlewares/BackgroundCommandMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ class BackgroundCommandMiddleware extends BaseObject implements Middleware
*/
public $backgroundHandlerBinaryArguments = [];

/**
* @param $command
* @param callable $next
*
* @return string
*/
public function execute($command, callable $next)
{

Expand All @@ -70,10 +64,6 @@ public function execute($command, callable $next)
return $next($command);
}

/**
* @param BackgroundCommand $command
* @return string
*/
protected function runProcess(BackgroundCommand $command)
{
$binary = $this->getBackgroundHandlerBinary();
Expand All @@ -82,7 +72,7 @@ protected function runProcess(BackgroundCommand $command)
$arguments = implode(' ', $this->getBackgroundHandlerArguments($command));
$binaryArguments = implode(' ', $this->backgroundHandlerBinaryArguments);

$process = new Process("{$binary} {$binaryArguments} {$path} {$route} {$arguments}");
$process = new Process([$binary, $binaryArguments, $path, $route, $arguments]);
$process->setTimeout($this->backgroundProcessTimeout);
$process->setIdleTimeout($this->backgroundProcessIdleTimeout);
if ($command->isAsync()) {
Expand Down Expand Up @@ -111,9 +101,6 @@ public function getBackgroundHandlerPath()
return Yii::getAlias($this->backgroundHandlerPath);
}

/**
* @return mixed
*/
public function getBackgroundHandlerRoute()
{
return $this->backgroundHandlerRoute;
Expand Down

0 comments on commit 8a4f8fc

Please sign in to comment.