M
M
Mokhirjon Naimov2016-09-09 16:50:21
Laravel
Mokhirjon Naimov, 2016-09-09 16:50:21

Why is Artisan::call/queue('some:command') waiting for a response instead of just running a command?

PHP Framework Laravel is used.
There is a console command that runs for ~10 minutes. I want to run this command through the web interface without waiting for a response/command completion.
Did it like this:

public function someCommand()
{
    \Artisan::queue('some:command'); // Artisan::call() тоже пробовал

    flash()->info('The command has been launched.');

    return redirect()->back();
}

But this method returns 503, meaning it waits for a response or command completion.
How can I make the console command just run, without waiting for the response / completion of the command?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Evgrafovich, 2016-09-09
@zvermafia

Did you enable the driver in the config/queue.php config?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question