We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug A clear and concise description of what the bug is.
我开启了一个进程处理redis的发布订阅,代码如下:
<?php namespace App\Process; use Swoft\Bean\Annotation\Mapping\Bean; use Swoft\Db\Exception\DbException; use Swoft\Log\Helper\CLog; use Swoft\Process\Process; use Swoft\Process\UserProcess; use Swoft\Redis\Redis; /** * Class QueueSubscribeProcess * @package App\Process * @Bean() */ class QueueSubscribeProcess extends UserProcess { /** * @param Process $process * * @throws DbException */ public function run(Process $process): void { while (true) { ini_set('default_socket_timeout', -1); //不超时 // 订阅 2 个频道 Redis::subscribe(['test'], function ($redis, $pattern, $chan, $msg){ echo "Pattern: $pattern\n"; echo "Channel: $chan\n"; echo "Payload: $msg\n"; }); Coroutine::sleep(3); } } }
我使用redis发布消息,这个订阅没有反应。 我也通过swoft程序发布消息,而程序的订阅和redis客户端订阅频道,也没有任何反应
The text was updated successfully, but these errors were encountered:
cli 测试有反应的 看看 使用是否正确 框架没有做封装 使用的 redis 扩展
Sorry, something went wrong.
我用swoole 的redis有反应, 而用swoft 一定反应都没有
sakuraovq
No branches or pull requests
Describe the bug
A clear and concise description of what the bug is.
我开启了一个进程处理redis的发布订阅,代码如下:
我使用redis发布消息,这个订阅没有反应。
我也通过swoft程序发布消息,而程序的订阅和redis客户端订阅频道,也没有任何反应
The text was updated successfully, but these errors were encountered: