added dump endpoints to debug api

This commit is contained in:
Kevin Froman 2020-08-08 21:19:09 -05:00
parent 3473c5e36a
commit a01b645a79

View File

@ -24,7 +24,15 @@ from deadsimplekv import DeadSimpleKV
flask_blueprint = Blueprint('debugAPI', __name__)
@flask_blueprint.route('/debug/dump_shared_state')
def get_shared_state():
resp = ""
for i in g.too_many.objects.keys:
resp += i + dir(g.too_many.objects.keys[i])
return Response(resp)
@flask_blueprint.route('/debug/dump_shared_vars')
def get_shared_vars():
kv: DeadSimpleKV = g.too_many.get(DeadSimpleKV)
return Response(kv.get_raw_json())
return Response(dir(kv._data))