added dump endpoints to debug api

master
Kevin Froman 2020-08-08 21:19:09 -05:00
parent 3473c5e36a
commit a01b645a79
1 changed files with 9 additions and 1 deletions

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))