Configure timeouts from envvar
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2020-05-08 19:44:42 +02:00
parent 58d7de6073
commit eb03474392
3 changed files with 4 additions and 2 deletions

View File

@ -23,7 +23,7 @@ class LogView(FlaskView):
# update expirity
redis_client.set(prod_key, remote_ip.encode('utf-8'))
redis_client.expire(prod_key, 240)
redis_client.expire(prod_key, current_app.config["PRODUCER_TIMEOUT"])
# print out message
current_app.logger.info(f"New message: {request.json['message']}")

View File

@ -29,7 +29,7 @@ class SyncView(FlaskView):
}
redis_client.set(cust_key, json.dumps(info).encode('utf-8'))
redis_client.expire(cust_key, 30)
redis_client.expire(cust_key, current_app.config["CUSTOMER_TIMEOUT"])
response = {
"uuid": current_app.config['LOCAL_UUID']