|
@@ -2419,7 +2419,14 @@ func (this *FutureGoodChartInfoController) ChartInfoBase64Upload() {
|
|
|
select {
|
|
|
case <-time.After(30 * time.Second):
|
|
|
utils.FileLog.Info("执行超过30秒 杀死超时进程")
|
|
|
- cmd.Process.Kill()
|
|
|
+ e := cmd.Process.Kill()
|
|
|
+ if e != nil {
|
|
|
+ fmt.Println("cmd kill err: ", e.Error())
|
|
|
+ utils.FileLog.Info(fmt.Sprintf("cmd kill err: %s", e.Error()))
|
|
|
+ br.Msg = "图片生成失败"
|
|
|
+ br.ErrMsg = "图片生成失败, 执行超时" + e.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
fmt.Println("timeout kill process")
|
|
|
case <-doneChannel:
|
|
|
fmt.Println("done")
|