|
@@ -512,11 +512,11 @@ print(output)
|
|
|
pythonCode = fmt.Sprintf(pythonCode, path, period, seasonal, trend, fraction, seasonalDeg, trendDeg, lowPassDeg, robustStr, toPath)
|
|
|
cmd := exec.Command(`python3`, "-c", pythonCode)
|
|
|
output, err := cmd.CombinedOutput()
|
|
|
+ alarm_msg.SendAlarmMsg(string(output), 1)
|
|
|
if err != nil {
|
|
|
utils.FileLog.Info("execStlPythonCode error:%s, input: path:%s, toPath:%s, period:%d, seasonal:%d, trendDeg:%d, seasonalDeg:%d, lowPassDeg:%d, fraction:%g, robust:%s", err.Error(), path, toPath, period, seasonal, trend, trendDeg, seasonalDeg, lowPassDeg, fraction, robust)
|
|
|
return
|
|
|
}
|
|
|
- alarm_msg.SendAlarmMsg(string(output), 1)
|
|
|
defer cmd.Process.Kill()
|
|
|
if err = json.Unmarshal(output, &stlResult); err != nil {
|
|
|
utils.FileLog.Info("execStlPythonCode Unmarshal error:%s, input: path:%s, toPath:%s, period:%d, seasonal:%d, trendDeg:%d, seasonalDeg:%d, lowPassDeg:%d, fraction:%g, robust:%s, output:%s", err.Error(), path, toPath, period, seasonal, trend, trendDeg, seasonalDeg, lowPassDeg, fraction, robust, string(output))
|