From a01b645a79ea3bdfdd4b5b0ff5b5c30cf9c8baf0 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Sat, 8 Aug 2020 21:19:09 -0500 Subject: [PATCH] added dump endpoints to debug api --- static-data/default-plugins/debuginfo/debugapi.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/static-data/default-plugins/debuginfo/debugapi.py b/static-data/default-plugins/debuginfo/debugapi.py index 2b2115e0..fdb5a457 100755 --- a/static-data/default-plugins/debuginfo/debugapi.py +++ b/static-data/default-plugins/debuginfo/debugapi.py @@ -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))