Skip to content

Commit

Permalink
Fix pcntl extension error for queue (#15393)
Browse files Browse the repository at this point in the history
  • Loading branch information
srmklive authored and taylorotwell committed Sep 13, 2016
1 parent fca5200 commit 40438b3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Illuminate/Queue/Console/ListenCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Illuminate\Queue\Console;

use RuntimeException;
use Illuminate\Queue\Listener;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
Expand Down Expand Up @@ -47,6 +48,8 @@ public function __construct(Listener $listener)
* Execute the console command.
*
* @return void
*
* @throws \RuntimeException
*/
public function fire()
{
Expand All @@ -63,6 +66,10 @@ public function fire()

$timeout = $this->input->getOption('timeout');

if ($timeout && ! function_exists('pcntl_fork')) {
throw new RuntimeException('Timeouts not supported without the pcntl_fork extension.');
}

// We need to get the right queue for the connection which is set in the queue
// configuration file for the application. We will pull it based on the set
// connection being run for the queue operation currently being executed.
Expand Down

0 comments on commit 40438b3

Please sign in to comment.