Commit cf32785ae36c507f9fd2cd2de47f47852c475293
1 parent
fc88324a
fix: 设置 onlineCount 全局变量
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/services/agent_ctrl.lua
@@ -141,10 +141,10 @@ function _M:check_agent_status() | @@ -141,10 +141,10 @@ function _M:check_agent_status() | ||
141 | end | 141 | end |
142 | end | 142 | end |
143 | 143 | ||
144 | + local count = table_nums(self.u2f) | ||
144 | datacenter.set("onlineCount", count) | 145 | datacenter.set("onlineCount", count) |
145 | if now >= next_log_time and now % 60 == 0 then | 146 | if now >= next_log_time and now % 60 == 0 then |
146 | next_log_time = now + 60 | 147 | next_log_time = now + 60 |
147 | - local count = table_nums(self.u2f) | ||
148 | --datacenter.set("onlineCount", count) | 148 | --datacenter.set("onlineCount", count) |
149 | logproxy:log({["@type"] = "online", count = count}, "log") | 149 | logproxy:log({["@type"] = "online", count = count}, "log") |
150 | end | 150 | end |