Fix ai's doc

This commit is contained in:
2026-06-08 13:55:55 +08:00
parent 28581ea3fd
commit bb3374b5cc
4 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ Minecraft 服务器守护进程
[![License](https://img.shields.io/badge/License-MulanPubL--2.0-orange.svg)](http://license.coscl.org.cn/MulanPubL-2.0)
[![Ruby](https://img.shields.io/badge/Ruby-%3E%3D3.0-cc342d?logo=ruby)](https://www.ruby-lang.org)
[![Platform](https://img.shields.io/badge/Platform-Linux%20%7C%20Windows-blue)](#跨场景适配指南)
[![Platform](https://img.shields.io/badge/Platform-Linux%20%7C%20Windows-blue)](docs/DEPLOY.md#跨场景适配指南)
## 快速开始
+6 -6
View File
@@ -136,10 +136,10 @@ MineSentinel 启动:
| 参数 | 文件 | 行 | 默认值 |
|------|------|-----|--------|
| 初始宽限期 | `config.rb` | 1 | `300` s |
| 冷却期 | `config.rb` | 3 | `200` s |
| 尝试次数 | `config.rb` | 2 | `3` 次 |
| 检测间隔 | `config.rb` | 4 | `1.5` s |
| 初始宽限期 | `config.rb` | 18 | `300` s |
| 冷却期 | `config.rb` | 22 | `200` s |
| 尝试次数 | `config.rb` | 20 | `3` 次 |
| 检测间隔 | `config.rb` | 24 | `1.5` s |
| systemctl 超时 | `method_executor.rb` | 17 | `30` s |
| 最大重试 | `method_executor.rb` | 23 | `10` 次 |
| 检测端口 | `server_status_detector.rb` | 60 | `25565` |
@@ -204,8 +204,8 @@ pid = spawn "cmd /c start /B java -Xmx4G -jar C:\\mc\\server.jar nogui"
```ruby
# server_status_detector.rb 第 60 行
res = test_port('192.168.1.100', 3306) # MySQL
res = test_port('127.0.0.1', 80) # Nginx
res = ServerStatusDetector::TcpServer.test_port('192.168.1.100', 3306) # MySQL
res = ServerStatusDetector::TcpServer.test_port('127.0.0.1', 80) # Nginx
```
配合修改 `method_executor.rb` 中的重启命令即可适配。
+1 -1
View File
@@ -44,7 +44,7 @@ def main
begin
upd_result = UpdateManager.check
if upd_result[:status] == :NewerAvailable
if upd_result[:type] == :NewerAvailable
MethodExecutor.record('info', 'updates',
"Update #{upd_result[:version]} available, please check the git repo for details.")
end
+1 -1
View File
@@ -38,7 +38,7 @@ class SystemdNotifier
end
# @return [Boolean]
def enabled?
def self.enabled?
@enable_heartbeat
end