Fixed timeout not being used
	
		
			
	
		
	
	
		
	
		
			Some checks reported errors
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build was killed
				
			
		
		
	
	
				
					
				
			
		
			Some checks reported errors
		
		
	
	continuous-integration/drone/push Build was killed
				
			This commit is contained in:
		
							
								
								
									
										4
									
								
								app.py
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								app.py
									
									
									
									
									
								
							@@ -30,7 +30,9 @@ def main():
 | 
				
			|||||||
    # set logging preferences
 | 
					    # set logging preferences
 | 
				
			||||||
    logging.basicConfig(filename='', level=logging.DEBUG)
 | 
					    logging.basicConfig(filename='', level=logging.DEBUG)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    redis_storage = RedisSuperStorage(os.environ.get('REDIS_URL', "redis://localhost:6379/0"), 5)
 | 
					    redis_storage = RedisSuperStorage(os.environ.get('REDIS_URL', "redis://localhost:6379/0"),
 | 
				
			||||||
 | 
					                                      os.environ.get("CUSTOMER_TIMEOUT", 30))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    consumer_communicator = ConsumerCommunicator(redis_storage)
 | 
					    consumer_communicator = ConsumerCommunicator(redis_storage)
 | 
				
			||||||
    producer_communicator = ProducerCommunicator(redis_storage)
 | 
					    producer_communicator = ProducerCommunicator(redis_storage)
 | 
				
			||||||
    ip_watchdog = IPWatchdog(redis_storage)
 | 
					    ip_watchdog = IPWatchdog(redis_storage)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -48,7 +48,7 @@ class RedisSuperStorage:
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.r.set(cust_key, json.dumps(info).encode('utf-8'))
 | 
					        self.r.set(cust_key, json.dumps(info).encode('utf-8'))
 | 
				
			||||||
        self.r.expire(cust_key, os.environ.get("CUSTOMER_TIMEOUT",30))
 | 
					        self.r.expire(cust_key, self._timeout)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def get_current_ip(self) -> str:
 | 
					    def get_current_ip(self) -> str:
 | 
				
			||||||
        ip = self.r.get('current_ip')
 | 
					        ip = self.r.get('current_ip')
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user