通知短信+运营短信,5秒速达,支持群发助手一键发送🚀高效触达和通知客户 广告
`config`下新建 <details> <summary>boot-queue.php</summary> ~~~ <?php return [ 'test' => [//test为进程名称前缀 //队列连接-需要返回一个redis连接 'conn' => [ //类名 'class' => \app\service\queue\test\Conn::class, //方法名 'method' => 'getConn' ], //无消息休息秒数 'sleep' => 1, //队列消费命令-redis的blpop指令可更换为brpop 'exec' => 'blPop', //消费命令等待时间-blpop指令的阻塞时间 'timeout' => 2, //消费线程数-数量为1时可保证顺序性执行 'pop_num' => 1, //进程名称 'process_name' => 'queue test',//改配置产生的进程名称为【test=>queue test : 0】(0为第一个工作组) //队列key 'topics' => 'queue', //业务逻辑 'logic' => [ //类名 'class' => \app\service\queue\test\Logic::class, //调用方法关键字,一级类目 //{"method":"test","t":"test"} 关键字method:test方法 //'call_func_key' => 'cmd'则{"cmd":"test","t":"test"} 'call_func_key' => 'method' ], //异常是否退出,例如未找到对应执行方法 'err_break' => true ] ]; ~~~ </details> 详见`gitee`,涉及修改文件: `SwooleInit.php` `event.php` `service目录` `config目录`