I'm trying to set up a table in order to asynchronously execute jobs in Laravel. I've already written the job class and can dispatch it. However it is dispatching synchronously.
Following the documentation When I attempt to create the migration with php artisan queue:table
I receive the following error:
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "queue:table" is not defined.
Did you mean one of these?
queue:failed
queue:work
queue:restart
queue:listen
queue:retry
queue:forget
queue:flush
I noticed I didn't initially have a queue.php file in the config directory so I added the one from the repository and changed 'default' => env('QUEUE_DRIVER', 'sync')
to 'default' => env('QUEUE_DRIVER', 'database'),
;
I also changed QUEUE_DRIVER=sync
to QUEUE_DRIVER=database
in my .env file.
I'm new to job queues in Laravel so I'm not sure what I'm missing. How can I create the migration to utilize the database queue driver?
UPDATE:
I wound up just creating a jobs table in the postgres db I'm using for the rest of my data following the structure described in the Lumen documentation and using that to store jobs but still curious why the queue:table
function isn't available.
Laravel Framework version Lumen (5.3.3) (Laravel Components 5.3.*)