c2a13aeba9ec78e487e7381ffaccf2c8f6bcd1d06575888af086bf0dabc4c3c5.json 18 KB

1
  1. {"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "label": "main.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L1"}, {"id": "app_main_lifespan", "label": "lifespan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L49"}, {"id": "app_main_db_pool_keepalive_loop", "label": "_db_pool_keepalive_loop()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L80"}, {"id": "app_main_error_json", "label": "_error_json()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L128"}, {"id": "app_main_sqlalchemy_exception_handler", "label": "sqlalchemy_exception_handler()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L141"}, {"id": "app_main_unhandled_exception_handler", "label": "unhandled_exception_handler()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L152"}, {"id": "app_main_mask_secret", "label": "_mask_secret()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L184"}, {"id": "app_main_root", "label": "root()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L206"}, {"id": "app_main_health_check", "label": "health_check()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L211"}, {"id": "app_main_rationale_81", "label": "\u5b9a\u671f ping MySQL\uff0c\u907f\u514d\u8fdc\u7a0b\u5e93/NAT \u56de\u6536\u7a7a\u95f2 TCP \u540e\u9996\u8bf7\u6c42\u957f\u65f6\u95f4\u5361\u4f4f\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L81"}, {"id": "app_main_rationale_142", "label": "\u6570\u636e\u5e93\u5f02\u5e38\uff1a\u8fd4\u56de JSON \u5e76\u4fdd\u7559 CORS \u5934\uff0c\u907f\u514d\u6d4f\u89c8\u5668\u53ea\u62a5\u8de8\u57df\u9519\u8bef", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L142"}, {"id": "app_main_rationale_153", "label": "\u672a\u6355\u83b7\u5f02\u5e38\uff1a\u7edf\u4e00 JSON 500\uff0c\u786e\u4fdd\u8de8\u57df\u573a\u666f\u4e0b\u4ecd\u6709 Access-Control-Allow-Origin", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L153"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "asyncio", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "contextlib", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "logging", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "fastapi_middleware_cors", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L8", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "fastapi_responses", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L9", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "sqlalchemy", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L10", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "sqlalchemy_exc", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L11", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_core_config", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L13", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_core_database", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L14", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_core_api_request_log_middleware", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L15", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_core_api_crypto_middleware", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L16", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_models", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L17", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_models_bx_models", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L18", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_models_db_models", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L19", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_models_pl_models", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L20", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_models_duty_models", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L21", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_api", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L22", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_api_pl", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L34", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_api_pl_public_transport", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L35", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_api_pl_public_transport_site", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L36", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_api_pl_public_site", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L37", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_api_pl_public_io_order", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L38", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_api_db_public_inventory", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L42", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_api_db_public_vehicles", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L43", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_api_duty", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L44", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_api_public_duty", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L45", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_main_lifespan", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L49", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_main_db_pool_keepalive_loop", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L80", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_main_error_json", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L128", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_main_sqlalchemy_exception_handler", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L141", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_main_unhandled_exception_handler", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L152", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_main_mask_secret", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L184", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_main_root", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L206", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "app_main_health_check", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L211", "weight": 1.0}, {"source": "app_main_lifespan", "target": "app_main_db_pool_keepalive_loop", "relation": "calls", "context": "call", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L62", "weight": 1.0}, {"source": "app_main_sqlalchemy_exception_handler", "target": "app_main_error_json", "relation": "calls", "context": "call", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L148", "weight": 1.0}, {"source": "app_main_unhandled_exception_handler", "target": "app_main_error_json", "relation": "calls", "context": "call", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L159", "weight": 1.0}, {"source": "app_main_rationale_81", "target": "app_main_db_pool_keepalive_loop", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L81", "weight": 1.0}, {"source": "app_main_rationale_142", "target": "app_main_sqlalchemy_exception_handler", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L142", "weight": 1.0}, {"source": "app_main_rationale_153", "target": "app_main_unhandled_exception_handler", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L153", "weight": 1.0}], "raw_calls": [{"caller_nid": "app_main_lifespan", "callee": "ensure_initialized", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L53"}, {"caller_nid": "app_main_lifespan", "callee": "init_scheduled_tasks", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L58"}, {"caller_nid": "app_main_lifespan", "callee": "warning", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L60"}, {"caller_nid": "app_main_lifespan", "callee": "create_task", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L62"}, {"caller_nid": "app_main_lifespan", "callee": "cancel", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L66"}, {"caller_nid": "app_main_lifespan", "callee": "shutdown_scheduler", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L75"}, {"caller_nid": "app_main_db_pool_keepalive_loop", "callee": "max", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L82"}, {"caller_nid": "app_main_db_pool_keepalive_loop", "callee": "int", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L82"}, {"caller_nid": "app_main_db_pool_keepalive_loop", "callee": "sleep", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L97"}, {"caller_nid": "app_main_db_pool_keepalive_loop", "callee": "to_thread", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L99"}, {"caller_nid": "app_main_db_pool_keepalive_loop", "callee": "debug", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L101"}, {"caller_nid": "app_main_error_json", "callee": "JSONResponse", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L129"}, {"caller_nid": "app_main_error_json", "callee": "int", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L135"}, {"caller_nid": "app_main_error_json", "callee": "timestamp", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L135"}, {"caller_nid": "app_main_error_json", "callee": "now", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L135"}, {"caller_nid": "app_main_sqlalchemy_exception_handler", "callee": "exception", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L143"}, {"caller_nid": "app_main_sqlalchemy_exception_handler", "callee": "getattr", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L145"}, {"caller_nid": "app_main_unhandled_exception_handler", "callee": "exception", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L154"}, {"caller_nid": "app_main_unhandled_exception_handler", "callee": "str", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L156"}, {"caller_nid": "app_main_mask_secret", "callee": "len", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L187"}, {"caller_nid": "app_main_mask_secret", "callee": "len", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L188"}]}