Change update to 30 days as per MaxMind license agreement
This commit is contained in:
		
							parent
							
								
									942a5a4735
								
							
						
					
					
						commit
						f526a765bc
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -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...") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue