This commit is contained in:
suyl
2021-08-10 15:49:54 +08:00
parent 2843356057
commit 7b8489fa50
2 changed files with 6 additions and 4 deletions

View File

@@ -1957,7 +1957,7 @@ func TempJob() (err error) {
// }, []int{0, 1}) // }, []int{0, 1})
//tasksch.HandleTask(task, nil, true).Run() //tasksch.HandleTask(task, nil, true).Run()
//task.GetID() //task.GetID()
MtUnionJobAutoUpdate(jxcontext.AdminCtx) err = MtUnionJobAutoUpdate(jxcontext.AdminCtx)
return err return err
} }
@@ -2187,7 +2187,6 @@ func MtUnionJobAutoUpdate(ctx *jxcontext.Context) (err error) {
percentage := 0 percentage := 0
if v.ActRule != "" { if v.ActRule != "" {
if storeURLs := regexp.MustCompile(`href="(.*?)"`).FindStringSubmatch(strings.ReplaceAll(v.ActRule, "\\", "")); len(storeURLs) > 0 { if storeURLs := regexp.MustCompile(`href="(.*?)"`).FindStringSubmatch(strings.ReplaceAll(v.ActRule, "\\", "")); len(storeURLs) > 0 {
fmt.Println("storeURLs .........................", storeURLs)
storeURL = storeURLs[1] storeURL = storeURLs[1]
} }
} }
@@ -2196,7 +2195,7 @@ func MtUnionJobAutoUpdate(ctx *jxcontext.Context) (err error) {
percentage = utils.Str2Int(ratios[1]) percentage = utils.Str2Int(ratios[1])
} }
} }
PublishJob(ctx, &model.JobExt{ _, _, err = PublishJob(ctx, &model.JobExt{
FinishedAtStr: utils.Time2Str(v.DateEnd), FinishedAtStr: utils.Time2Str(v.DateEnd),
Job: model.Job{ Job: model.Job{
VendorID: model.VendorIDMTWM, VendorID: model.VendorIDMTWM,
@@ -2219,6 +2218,9 @@ func MtUnionJobAutoUpdate(ctx *jxcontext.Context) (err error) {
Percentage: percentage, Percentage: percentage,
}, },
}) })
if err != nil {
return err
}
break break
} }
return err return err

View File

@@ -546,7 +546,7 @@ func (c *JobController) RefreshJdDelivery() {
// @router /TempJob [post] // @router /TempJob [post]
func (c *JobController) TempJob() { func (c *JobController) TempJob() {
c.callTempJob(func(params *tJobTempJobParams) (retVal interface{}, errCode string, err error) { c.callTempJob(func(params *tJobTempJobParams) (retVal interface{}, errCode string, err error) {
cms.TempJob() err = cms.TempJob()
//cms.TestTemp() //cms.TestTemp()
return retVal, "", err return retVal, "", err
}) })