This commit is contained in:
@@ -8,6 +8,8 @@ from flask_classful import FlaskView
|
||||
class ConsumersView(FlaskView):
|
||||
|
||||
def get(self):
|
||||
# load the currently available consumer list from the redis database
|
||||
consumer_list = json.loads((redis_client.get("consumer_list") or b"{}").decode('utf-8'))
|
||||
current_app.logger.warning(jsonify([v['ip'] for k, v in consumer_list.items()]))
|
||||
|
||||
# jsonify and return the list of active consumers
|
||||
return jsonify([v['ip'] for k, v in consumer_list.items()])
|
||||
|
||||
Reference in New Issue
Block a user