Skip to content

Commit

Permalink
使用redis pub/sub代替channel
Browse files Browse the repository at this point in the history
  • Loading branch information
chaz6chez committed Apr 23, 2024
1 parent 69d8188 commit 99c5323
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 6 additions & 4 deletions src/config/plugin/workbunny/webman-push-server/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@
// 推送服务配置
'push-server' => [
// redis通道
'redis_channel' => 'default',
'redis_channel' => 'default',
// 心跳检查,0为不检查
'heartbeat' => 60,
'heartbeat' => 60,
// 是否使用redis替代channel
'channel_substitution_enable' => false,
// channel默认地址
'channel_host' => '127.0.0.1',
'channel_host' => '127.0.0.1',
// channel默认端口
'channel_port' => 2206,
'channel_port' => 2206,
// 验证app_key
'apps_query' => function (string $appKey, ?string $appId = null): array
{
Expand Down
5 changes: 3 additions & 2 deletions src/config/plugin/workbunny/webman-push-server/process.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
'count' => cpu_count(),
'reloadable' => false, // 执行reload不重启
'reusePort' => true
],
]
] + (config('plugin.workbunny.webman-push-server.app.push-server.channel_substitution_enable') ? [] : [
// channel server
'channel-server' => [
'handler' => ChannelServer::class,
Expand All @@ -51,4 +52,4 @@
'reloadable' => false, // 执行reload不重启
'reusePort' => true
],
];
]);

0 comments on commit 99c5323

Please sign in to comment.