You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gojobs/jobs.go

26 lines
757 B

2 years ago
package gojobs
const (
2 years ago
TASK_IN = "IN" // 任务运行
TASK_SUCCESS = "SUCCESS" // 任务完成
TASK_ERROR = "ERROR" // 任务异常
TASK_TIMEOUT = "TIMEOUT" // 任务超时
TASK_WAIT = "WAIT" // 任务等待
2 years ago
)
2 years ago
// Cron
type jobs interface {
// Run 运行
2 years ago
Run(info interface{}, status int, desc string)
2 years ago
// RunAddLog 任务执行日志
2 years ago
RunAddLog(id uint, runId string)
2 years ago
// CreateInCustomId 创建正在运行任务
CreateInCustomId()
// CreateInCustomIdOnly 创建正在运行唯一任务
CreateInCustomIdOnly()
// CreateInCustomIdMaxNumber 创建正在运行任务并限制数量
CreateInCustomIdMaxNumber()
// CreateInCustomIdMaxNumberOnly 创建正在运行唯一任务并限制数量
CreateInCustomIdMaxNumberOnly()
2 years ago
}