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'),
    
    评论

报告相同问题?

悬赏问题

  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据