Update patches/background_task/models.py

This commit is contained in:
tcely 2025-03-25 12:44:14 -04:00 committed by GitHub
parent 41e78b430d
commit 7f7ba6b286
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -49,7 +49,7 @@ class TaskManager(models.Manager):
boot_time = self.posix_epoch
kcore_path = Path('/proc/kcore')
if kcore_path.exists():
stats = kcore_path.stats()
stats = kcore_path.stat()
if stats:
boot_time += timedelta(seconds=stats.st_mtime)
if boot_time > self._boot_time: