- update
continuous-integration/drone/push Build is failing Details
continuous-integration/drone/tag Build is failing Details

master v1.0.26
李光春 2 years ago
parent c86027a4d3
commit eda0a4ef22

@ -1,4 +1,4 @@
## v1.0.22-25
## v1.0.22-26
- update

@ -68,7 +68,7 @@ func (jobsGorm *JobsGorm) CreateInCustomId(config *ConfigCreateInCustomId) error
UpdatedIp: jobsGorm.outsideIp,
})
if createStatus.RowsAffected == 0 {
return errors.New(fmt.Sprintf("创建任务失败:%s", createStatus.Error))
return errors.New(fmt.Sprintf("创建[%s@%s]任务失败:%s", config.CustomId, config.Type, createStatus.Error))
}
return nil
}
@ -88,7 +88,7 @@ type ConfigCreateInCustomIdOnly struct {
func (jobsGorm *JobsGorm) CreateInCustomIdOnly(config *ConfigCreateInCustomIdOnly) error {
query := jobsGorm.TaskTypeTakeIn(config.Tx, config.CustomId, config.Type)
if query.Id != 0 {
return errors.New("任务已存在")
return errors.New(fmt.Sprintf("%d:[%s@%s]任务已存在", query.Id, config.CustomId, config.Type))
}
createStatus := config.Tx.Create(&Task{
Status: jobs_common.TASK_IN,
@ -104,7 +104,7 @@ func (jobsGorm *JobsGorm) CreateInCustomIdOnly(config *ConfigCreateInCustomIdOnl
UpdatedIp: jobsGorm.outsideIp,
})
if createStatus.RowsAffected == 0 {
return errors.New(fmt.Sprintf("创建任务失败:%s", createStatus.Error))
return errors.New(fmt.Sprintf("创建[%s@%s]任务失败:%s", config.CustomId, config.Type, createStatus.Error))
}
return nil
}
@ -138,7 +138,7 @@ func (jobsGorm *JobsGorm) CreateInCustomIdMaxNumber(config *ConfigCreateInCustom
UpdatedIp: jobsGorm.outsideIp,
})
if createStatus.RowsAffected == 0 {
return errors.New(fmt.Sprintf("创建任务失败:%s", createStatus.Error))
return errors.New(fmt.Sprintf("创建[%s@%s]任务失败:%s", config.CustomId, config.Type, createStatus.Error))
}
return nil
}
@ -159,7 +159,7 @@ type ConfigCreateInCustomIdMaxNumberOnly struct {
func (jobsGorm *JobsGorm) CreateInCustomIdMaxNumberOnly(config *ConfigCreateInCustomIdMaxNumberOnly) error {
query := jobsGorm.TaskTypeTakeIn(config.Tx, config.CustomId, config.Type)
if query.Id != 0 {
return errors.New("任务已存在")
return errors.New(fmt.Sprintf("%d:[%s@%s]任务已存在", query.Id, config.CustomId, config.Type))
}
createStatus := config.Tx.Create(&Task{
Status: jobs_common.TASK_IN,
@ -176,7 +176,7 @@ func (jobsGorm *JobsGorm) CreateInCustomIdMaxNumberOnly(config *ConfigCreateInCu
UpdatedIp: jobsGorm.outsideIp,
})
if createStatus.RowsAffected == 0 {
return errors.New(fmt.Sprintf("创建任务失败:%s", createStatus.Error))
return errors.New(fmt.Sprintf("创建[%s@%s]任务失败:%s", config.CustomId, config.Type, createStatus.Error))
}
return nil
}

@ -1,3 +1,3 @@
package gojobs
const Version = "1.0.25"
const Version = "1.0.26"

Loading…
Cancel
Save