minor
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Füleki Fábián 2020-05-08 21:04:13 +02:00
parent 6ead97eee0
commit 9fec4e81cc
4 changed files with 11 additions and 11 deletions

View File

@ -26,7 +26,6 @@ if SENTRY_DSN:
environment = os.environ.get('RELEASEMODE', 'dev')
)
app = Flask(__name__)
app.config['REDIS_URL'] = os.environ['REDIS_URL']
app.config['LOCAL_UUID'] = os.environ['LOCAL_UUID']

View File

@ -10,6 +10,7 @@ def client():
with current_app.test_client() as client:
yield client
def test_response_length(client):
r = client.post('/log')

View File

@ -8,7 +8,6 @@ from flask_classful import FlaskView
class ConsumersView(FlaskView):
def get(self):
keys = redis_client.keys('consumer_*')
list_of_customer_ips = []

View File

@ -19,7 +19,8 @@ class LogView(FlaskView):
if not last_known_remote_ip:
current_app.logger.info(f"New producer {remote_uuid} at {remote_ip}")
elif last_known_remote_ip != remote_ip:
current_app.logger.info(f"IP address of producer {remote_uuid} have changed: {last_known_remote_ip} -> {remote_ip}")
current_app.logger.info(
f"IP address of producer {remote_uuid} have changed: {last_known_remote_ip} -> {remote_ip}")
# update expirity
redis_client.set(prod_key, remote_ip.encode('utf-8'))