[英]Laravel Lumen Queue Failure with queue:work but not queue:listen
[英]Laravel/Lumen queue:listen not working
手動檢查Redis時,我能夠在Redis中排隊作業。 我也知道我既需要predis又需要照亮\\ redis
"predis/predis": "^1.0", "illuminate/redis": "5.2.*"
我已經包括並測試了
$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);
});
但是當我運行:`php artisan queue:listen redis'
它告訴我: [InvalidArgumentException] No connector for []
知道為什么嗎? 我的config/database.php
和config/queue.php
都是默認配置
在config / queue.php中,您需要指定正在使用的隊列
'default' => env('QUEUE_DRIVER', 'sync'),
在這一行(queue.php的頂部)中,您是否指定使用的是redis詳細信息?
'default' => env('QUEUE_DRIVER', 'redis'),
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.