mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-15 20:45:57 +08:00
AI automatically translates all comments in the code into English (#3917)
This commit is contained in:
@@ -251,7 +251,8 @@ static std::string httpBody() {
|
||||
|
||||
args["rand_str"] = makeRandStr(32);
|
||||
for (auto &pr : mINI::Instance()) {
|
||||
// 只获取转协议相关配置
|
||||
// 只获取转协议相关配置 [AUTO-TRANSLATED:4e1e5840]
|
||||
// Only get the configuration related to protocol conversion
|
||||
if (pr.first.find("protocol.") == 0) {
|
||||
args[pr.first] = pr.second;
|
||||
}
|
||||
@@ -261,21 +262,25 @@ static std::string httpBody() {
|
||||
|
||||
static void sendReport() {
|
||||
static HttpRequester::Ptr requester = std::make_shared<HttpRequester>();
|
||||
// 获取一次静态信息,定时上报主要方便统计在线实例个数
|
||||
// 获取一次静态信息,定时上报主要方便统计在线实例个数 [AUTO-TRANSLATED:1612d609]
|
||||
// Get static information once, and report it regularly to facilitate statistics of the number of online instances
|
||||
static auto body = httpBody();
|
||||
|
||||
requester->setMethod("POST");
|
||||
requester->setBody(body);
|
||||
// http超时时间设置为30秒
|
||||
// http超时时间设置为30秒 [AUTO-TRANSLATED:466f9b71]
|
||||
// Set the http timeout to 30 seconds
|
||||
requester->startRequester(s_report_url, nullptr, 30);
|
||||
}
|
||||
|
||||
static toolkit::onceToken s_token([]() {
|
||||
NoticeCenter::Instance().addListener(nullptr, "kBroadcastEventPollerPoolStarted", [](EventPollerPoolOnStartedArgs) {
|
||||
// 第一次汇报在程序启动后5分钟
|
||||
// 第一次汇报在程序启动后5分钟 [AUTO-TRANSLATED:02e6c508]
|
||||
// The first report is 5 minutes after the program starts
|
||||
pool.getPoller()->doDelayTask(5 * 60 * 1000, []() {
|
||||
sendReport();
|
||||
// 后续每一个小时汇报一次
|
||||
// 后续每一个小时汇报一次 [AUTO-TRANSLATED:0322b8aa]
|
||||
// Report every hour afterwards
|
||||
return 60 * 60 * 1000;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user