Provide Probe() a config instead of a process ID

This commit is contained in:
Ingo Oppermann
2023-08-09 09:30:17 +03:00
parent 3d7230444f
commit d930a91cbb
5 changed files with 37 additions and 38 deletions

View File

@@ -659,7 +659,12 @@ func (h *RestreamHandler) Probe(c echo.Context) error {
Domain: domain,
}
probe := h.restream.Probe(tid)
process, err := h.restream.GetProcess(tid)
if err != nil {
return api.Err(http.StatusNotFound, "")
}
probe := h.restream.Probe(process.Config, 20*time.Second)
apiprobe := api.Probe{}
apiprobe.Unmarshal(&probe)