This commit is contained in:
parent
0713cabc6b
commit
850598d519
4
app.py
4
app.py
@ -22,7 +22,7 @@ sentry_sdk.init("https://0a106e104e114bc9a3fa47f9cb0db2f4@sentry.kmlabz.com/10")
|
||||
|
||||
def get_initial_ip_list():
|
||||
ip_list = os.environ['INITIAL_SERVERS'].split(',')
|
||||
logging.debug('Initial ip list' + ", ".join(ip_list))
|
||||
logging.debug('Initial ip list ' + ", ".join(ip_list))
|
||||
return ip_list
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ def main():
|
||||
if ip_changed:
|
||||
producer_communicator.push_ip_update(ipaddr)
|
||||
|
||||
time.sleep(os.environ.get("RUN_INTERVAL", 30))
|
||||
time.sleep(int(os.environ.get("RUN_INTERVAL", 10)))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -48,7 +48,7 @@ class RedisSuperStorage:
|
||||
}
|
||||
|
||||
self.r.set(cust_key, json.dumps(info).encode('utf-8'))
|
||||
self.r.expire(cust_key, os.environ["CUSTOMER_TIMEOUT"])
|
||||
self.r.expire(cust_key, os.environ.get("CUSTOMER_TIMEOUT",30))
|
||||
|
||||
def get_current_ip(self) -> str:
|
||||
ip = self.r.get('current_ip')
|
||||
|
Reference in New Issue
Block a user