MCPcopy
hub / github.com/volcengine/MineContext / get_debug_reports

Function get_debug_reports

opencontext/server/routes/debug.py:29–44  ·  view source on GitHub ↗

Get SQLite report table data (for debugging)

(
    limit: int = Query(10, ge=1, le=100),
    offset: int = Query(0, ge=0),
    is_deleted: bool = Query(False),
    opencontext: OpenContext = Depends(get_context_lab),
    _auth: str = auth_dependency,
)

Source from the content-addressed store, hash-verified

27
28@router.get("/api/debug/reports")
29async def get_debug_reports(
30 limit: int = Query(10, ge=1, le=100),
31 offset: int = Query(0, ge=0),
32 is_deleted: bool = Query(False),
33 opencontext: OpenContext = Depends(get_context_lab),
34 _auth: str = auth_dependency,
35):
36 """Get SQLite report table data (for debugging)"""
37 try:
38 reports = get_storage().get_reports(limit=limit, offset=offset, is_deleted=is_deleted)
39 logger.info(f"Successfully retrieved report list, {len(reports)} records in total")
40 return convert_resp(data={"reports": reports, "total": len(reports)})
41
42 except Exception as e:
43 logger.exception(f"Error getting debug reports: {e}")
44 return convert_resp(code=500, status=500, message=f"Failed to get debug reports: {str(e)}")
45
46
47@router.get("/api/debug/todos")

Callers

nothing calls this directly

Calls 5

get_storageFunction · 0.90
convert_respFunction · 0.90
QueryClass · 0.85
infoMethod · 0.80
get_reportsMethod · 0.45

Tested by

no test coverage detected