MCPcopy Create free account
hub / github.com/TheSecuredAnalyst/security-suite / api_trigger_run

Function api_trigger_run

dashboard/app.py:106–119  ·  view source on GitHub ↗
(body: RunRequest)

Source from the content-addressed store, hash-verified

104 "running": _live_run["running"],
105 "target": _live_run["target"],
106 "log": _live_run["log"][-50:], # last 50 lines
107 "error": _live_run["error"],
108 }
109
110 @app.post("/api/run")
111 async def api_trigger_run(body: RunRequest):
112 global _live_run
113 target = (body.target or "").strip()
114 mode = body.mode
115 profile = body.profile
116
117 if not target:
118 raise HTTPException(status_code=400, detail="target is required")
119 if _live_run["running"]:
120 raise HTTPException(status_code=409, detail="A run is already in progress")
121
122 _live_run = {"running": True, "target": target, "log": [], "error": ""}

Callers

nothing calls this directly

Calls 1

_background_runFunction · 0.85

Tested by

no test coverage detected