This commit is contained in:
midoks
2023-02-11 06:04:55 +08:00
parent 2d42486ac5
commit 2ca8598671
2 changed files with 3 additions and 5 deletions
-3
View File
@@ -15,9 +15,6 @@ local json = require "cjson"
local __C = require "waf_common"
local C = __C:getInstance()
-- cron
C:initCron()
local function timer_stats_total_log(premature)
C:timer_stats_total()
end
+3 -2
View File
@@ -42,8 +42,9 @@ end
function _M.getInstance(self)
if rawget(self, "instance") == nil then
rawset(self, "instance", self:new())
if self.instance == nil then
self.instance = self:new()
self.instance:initCron()
end
assert(self.instance ~= nil)
return self.instance