Change update to 30 days as per MaxMind license agreement

This commit is contained in:
Phillip Hernandez 2019-12-31 15:40:30 -05:00
parent 942a5a4735
commit f526a765bc

View file

@ -53,13 +53,13 @@ class GeoIPHandler(object):
try:
dbdate = date.fromtimestamp(stat(self.dbfile).st_mtime)
db_next_update = date.fromtimestamp(stat(self.dbfile).st_mtime) + timedelta(days=60)
db_next_update = date.fromtimestamp(stat(self.dbfile).st_mtime) + timedelta(days=30)
except FileNotFoundError:
self.logger.error("Could not find GeoLite2 DB as: %s", self.dbfile)
self.download()
dbdate = date.fromtimestamp(stat(self.dbfile).st_mtime)
db_next_update = date.fromtimestamp(stat(self.dbfile).st_mtime) + timedelta(days=60)
db_next_update = date.fromtimestamp(stat(self.dbfile).st_mtime) + timedelta(days=30)
if db_next_update < today:
self.logger.info("Newer GeoLite2 DB available, Updating...")