[英]Laravel/Lumen queue:listen not working
I am able to queue up jobs in redis as I checked redis manually. 手动检查Redis时,我能够在Redis中排队作业。 I'm also aware that i need both predis and illuminate\\redis
我也知道我既需要predis又需要照亮\\ redis
"predis/predis": "^1.0", "illuminate/redis": "5.2.*"
which i have included and tested 我已经包括并测试了
$app->get('/cache/predis', function () use ($app) {
$client = new Predis\Client();
$client->set('foo', 'bar');
$value = $client->get('foo');
return response()->json($value);
});
$app->get('/cache/redis', function () use ($app) {
$cache = $app['cache'];
$cache->store('redis')->put('bar', 'baz', 10);
$value = $cache>store('redis')->get('bar');
return response()->json($value);
});
However when I run: `php artisan queue:listen redis' 但是当我运行:`php artisan queue:listen redis'
it tells me: [InvalidArgumentException] No connector for []
它告诉我:
[InvalidArgumentException] No connector for []
Any idea why? 知道为什么吗? Both my
config/database.php
and config/queue.php
are default configuration 我的
config/database.php
和config/queue.php
都是默认配置
In the config/queue.php you need to specify which queue you are using 在config / queue.php中,您需要指定正在使用的队列
'default' => env('QUEUE_DRIVER', 'sync'),
In this line (top of queue.php) have you specified you are using the redis details? 在这一行(queue.php的顶部)中,您是否指定使用的是redis详细信息?
'default' => env('QUEUE_DRIVER', 'redis'),
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.