|
@@ -269,10 +269,12 @@ func (g *Gateway) ExtAPIHandler(w http.ResponseWriter, r *http.Request) {
|
|
}
|
|
}
|
|
scriptContent := string(scriptContentByte)
|
|
scriptContent := string(scriptContentByte)
|
|
|
|
|
|
- log.Println("[Remote AGI] IP:", r.RemoteAddr, " executed the script ", pathFromDb, "(", realPath, ")", " on behalf of", userInfo.Username)
|
|
|
|
-
|
|
|
|
// execute!
|
|
// execute!
|
|
|
|
+ start := time.Now()
|
|
g.ExecuteAGIScript(scriptContent, "", "", w, r, userInfo)
|
|
g.ExecuteAGIScript(scriptContent, "", "", w, r, userInfo)
|
|
|
|
+ duration := time.Since(start)
|
|
|
|
+
|
|
|
|
+ log.Println("[Remote AGI] IP:", r.RemoteAddr, " executed the script ", pathFromDb, "(", realPath, ")", " on behalf of", userInfo.Username, "with total duration: ", duration)
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|