started working on #343

This commit is contained in:
Simone Margaritelli
2019-10-20 17:36:34 +02:00
parent cd5d783c52
commit ff6bf5c198
3 changed files with 76 additions and 0 deletions

View File

@ -263,6 +263,9 @@ class StatusFile(object):
def newer_then_minutes(self, minutes):
return self._updated is not None and ((datetime.now() - self._updated).seconds / 60) < minutes
def newer_then_hours(self, hours):
return self._updated is not None and ((datetime.now() - self._updated).seconds / (60*60)) < hours
def newer_then_days(self, days):
return self._updated is not None and (datetime.now() - self._updated).days < days