修改plugin.webman.channel.server端口号为2207

This commit is contained in:
2026-03-25 17:52:05 +08:00
parent 60833aa6ff
commit 6c6971c4bf
4 changed files with 40 additions and 6 deletions

View File

@@ -20,8 +20,13 @@ class Task
$dbName = env('DB_NAME');
if (!empty($dbName)) {
$this->logic = new CrontabLogic();
$channelHost = env('WEBMAN_CHANNEL_HOST', '127.0.0.1');
$channelPort = filter_var(env('WEBMAN_CHANNEL_PORT'), FILTER_VALIDATE_INT);
if ($channelPort === false) {
$channelPort = 2207;
}
// 连接webman channel服务
Client::connect();
Client::connect($channelHost, $channelPort);
// 订阅某个自定义事件并注册回调,收到事件后会自动触发此回调
Client::on('crontab', function ($data) {
$this->reload($data);