small fixes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Füleki Fábián 2020-05-08 22:32:18 +02:00
parent 0713cabc6b
commit 850598d519
2 changed files with 3 additions and 3 deletions

4
app.py
View File

@ -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__":

View File

@ -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')