This commit is contained in:
Gvidas Juknevičius 2024-08-25 22:17:46 +03:00
parent f4d109583b
commit dc1a26cd4e
Signed by: MCorange
GPG Key ID: 12B1346D720B7FBB
2 changed files with 6 additions and 6 deletions

View File

@ -364,10 +364,10 @@ rawset(__BUNDLER_FILES, "updater.lua", function ()
end end
function updater:check(branch) function updater:check(branch)
local curr = os.time(); local curr = os.time();
if (math.abs(curr - self.last_check) >= self.threshold) and (self.curr_commit_hash ~= "") then if not ((math.abs(curr - self.last_check) >= self.threshold) and (self.curr_commit_hash ~= "")) then
self.last_check = curr; return false;
return true;
end end
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
log.error("Updater:check: Could not send request: " .. rerr); log.error("Updater:check: Could not send request: " .. rerr);

View File

@ -50,10 +50,10 @@ end
function updater:check(branch) function updater:check(branch)
local curr = os.time(); local curr = os.time();
if (math.abs(curr - self.last_check) >= self.threshold) and (self.curr_commit_hash ~= "") then if not ((math.abs(curr - self.last_check) >= self.threshold) and (self.curr_commit_hash ~= "")) then
self.last_check = curr; return false;
return true;
end end
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