:3
This commit is contained in:
parent
cfc3374897
commit
7e5b7503d2
6
rtmc.lua
6
rtmc.lua
|
@ -377,8 +377,10 @@ rawset(__BUNDLER_FILES, "updater", function ()
|
|||
end
|
||||
function updater:check(branch)
|
||||
local curr = os.time();
|
||||
if not ((math.abs(curr - self.last_check) >= self.threshold) and (self.curr_commit_hash ~= "")) then
|
||||
return false;
|
||||
if math.abs(curr - self.last_check) < self.threshold then
|
||||
if self.curr_commit_hash ~= "" then
|
||||
return false;
|
||||
end
|
||||
end
|
||||
self.last_check = curr;
|
||||
local req, rerr = http.get(self.api_url .. "/commits?sha="..branch);
|
||||
|
|
|
@ -56,9 +56,10 @@ end
|
|||
|
||||
function updater:check(branch)
|
||||
local curr = os.time();
|
||||
if not ((math.abs(curr - self.last_check) >= self.threshold) and (self.curr_commit_hash ~= "")) then
|
||||
-- log.debug("Not time for an update yet");
|
||||
return false;
|
||||
if math.abs(curr - self.last_check) < self.threshold then
|
||||
if self.curr_commit_hash ~= "" then
|
||||
return false;
|
||||
end
|
||||
end
|
||||
self.last_check = curr;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user