Commit bb34abc5 authored by Seblu's avatar Seblu
Browse files

Fix check not updated when fetch package errors

When a package was removed from AUR, the check code didn't update the last_check
value and the loop code was always triggered.

[DEBUG] Next check is planned in -778781s, waiting for 1s
...
[DEBUG] Next check is planned in -778781s, waiting for 1s
...
[DEBUG] Next check is planned in -778781s, waiting for 1s
...
[DEBUG] Next check is planned in -778781s, waiting for 1s
parent 523cf897
Pipeline #274 passed with stages
in 11 minutes and 7 seconds
......@@ -333,10 +333,12 @@ class Package():
# next check is in the future
self.info(f"Next check is planned in {check_delta}s")
return check_delta
# Update the last check time
self._local.lastchecked = int(time())
check_delta = self.check_delta()
# get remote data
try:
self._aur = AURPackage(self.name, self._config.getint("timeout"))
self._local.lastchecked = int(time())
except Exception as exp:
self.error(f"Unable to get AUR package info: {exp}")
return check_delta
......@@ -372,8 +374,7 @@ class Package():
self.info(f"New version available: {self._aur.version}")
self.update()
# return updated check_delta
return self.check_delta()
return check_delta
class Robot():
'''AUR Package Builder Robot.'''
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment