This commit is contained in:
parent
0713cabc6b
commit
850598d519
2
app.py
2
app.py
@ -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