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