Run initial retention checks regardless of host uptime
This commit is contained in:
@@ -101,7 +101,7 @@ class CloudLibrary:
|
||||
return True
|
||||
|
||||
def sweep(self):
|
||||
if time.monotonic() - self.checked < 60:
|
||||
if self.checked and time.monotonic() - self.checked < 60:
|
||||
return
|
||||
self.checked = time.monotonic()
|
||||
with self.service.lock:
|
||||
|
||||
@@ -90,7 +90,7 @@ class Retention:
|
||||
)
|
||||
|
||||
def sweep(self):
|
||||
if time.monotonic() - self.checked < 3600:
|
||||
if self.checked and time.monotonic() - self.checked < 3600:
|
||||
return
|
||||
self.checked = time.monotonic()
|
||||
with self.service.lock:
|
||||
|
||||
@@ -86,7 +86,7 @@ class LocalRetention:
|
||||
}
|
||||
|
||||
def sweep(self, force=False, dry_run=False):
|
||||
if not force and time.monotonic() - self.last < 3600:
|
||||
if not force and self.last and time.monotonic() - self.last < 3600:
|
||||
return {}
|
||||
if not dry_run:
|
||||
self.last = time.monotonic()
|
||||
|
||||
Reference in New Issue
Block a user