douyan4470 2016-05-24 00:14
浏览 120

Laravel / Lumen队列:听不工作

I am able to queue up jobs in redis as I checked redis manually. I'm also aware that i need both predis and illuminateedis

"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'

it tells me: [InvalidArgumentException] No connector for []

Any idea why? Both my config/database.php and config/queue.php are default configuration

  • 写回答

1条回答 默认 最新

  • dpy33121 2016-05-24 00:23
    关注

    In the config/queue.php you need to specify which queue you are using

    'default' => env('QUEUE_DRIVER', 'sync'),
    

    In this line (top of queue.php) have you specified you are using the redis details?

    'default' => env('QUEUE_DRIVER', 'redis'),
    
    评论

报告相同问题?