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

2
app.py
View File

@ -48,7 +48,7 @@ def main():
if ip_changed: if ip_changed:
producer_communicator.push_ip_update(ipaddr) 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__": if __name__ == "__main__":

View File

@ -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["CUSTOMER_TIMEOUT"]) self.r.expire(cust_key, os.environ.get("CUSTOMER_TIMEOUT",30))
def get_current_ip(self) -> str: def get_current_ip(self) -> str:
ip = self.r.get('current_ip') ip = self.r.get('current_ip')