我试图使api和应用程序在服务器上协同工作,我可以从浏览器上获得api站点。要使应用程序与此api通信,我需要通过命令来排队工作:
php artisan queue:listen –queue=broadcast-queue但当我这么做的时候,我得到了一个例外:
The [–queue=broadcast-queue] queue connection has not been configured.
at vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php:159
155▕ {
156▕ $config = $this->getConfig($name);
157▕
158▕ if (is_null($config)) {
➜ 159▕ throw new InvalidArgumentException("The [{$name}] queue connection has not been configured.");
160▕ }
161▕
162▕ return $this->getConnector($config['driver'])
163▕ ->connect($config)
+17 vendor frames
18 artisan:37
Illuminate\Foundation\Console\Kernel::handle() 我试图谷歌这个例外,但似乎我是第一个得到这个。我确实没有问题地运行这些命令:
php artisan passport:install
php artisan key:generate
php artisan migrate
php artisan db:seed发布于 2022-04-16 09:16:32
拉勒维尔似乎没有找到任何队列连接..。
你做过这些吗?
php artisan queue:table然后检查您的.env文件
QUEUE_CONNECTION=sync应该是
QUEUE_CONNECTION=database否则,我认为您已经指定了一个队列连接,并且没有正确地配置它。
发布您的队列实现,以便我可以更多地了解您所做的事情。
发布于 2022-04-16 09:36:58
这是一个错误它应该是: php手工队列:侦听-队列=广播-队列
https://stackoverflow.com/questions/71892328
复制相似问题