[arch] improvement -> AUR: upgrade checking now considers modification dates as well

This commit is contained in:
Vinicius Moreira
2020-12-17 18:35:34 -03:00
parent 4540fc938e
commit cf17a91b83
32 changed files with 432 additions and 149 deletions

View File

@@ -23,14 +23,18 @@ class AsyncDiskCacheLoader(Thread, DiskCacheLoader):
self.logger = logger
self.processed = 0
def fill(self, pkg: SoftwarePackage):
def fill(self, pkg: SoftwarePackage, sync: bool = False):
"""
Adds a package which data must be read from the disk to a queue.
Adds a package which data must be read from the disk to a queue (if not sync)
:param pkg:
:param sync:
:return:
"""
if pkg and pkg.supports_disk_cache():
self.pkgs.append(pkg)
if sync:
self._fill_cached_data(pkg)
else:
self.pkgs.append(pkg)
def stop_working(self):
self._work = False