Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.3] Fix pcntl extension error for queue #15393

Merged
merged 1 commit into from
Sep 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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