Documentation ¶
Index ¶
- type TaskLog
- func (taskLog *TaskLog) Clear()
- func (taskLog *TaskLog) Create() int64
- func (taskLog *TaskLog) List(page int, pageSize int, taskName string) ([]TaskLog, int64)
- func (taskLog *TaskLog) Remove(id int)
- func (taskLog *TaskLog) Total(params map[string]interface{}) int64
- func (taskLog *TaskLog) Update(id int64, fieldMap map[string]interface{}) int64
- type TaskType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TaskLog ¶
type TaskLog struct { Id int64 `json:"id" gorm:"type:bigint(20); primary_key; auto_increment; not null"` TaskId int `json:"taskId" gorm:"type:int(20); not null; index:IDX_task_log_task_id; default 0"` // 任务id TaskName string `json:"taskName" gorm:"type:varchar(100); not null"` // 任务名称 CronExpression string `json:"cronExpression" gorm:"type:varchar(100); not null"` // crontab Protocol int8 `json:"protocol" gorm:"type:int(11); not null; index:IDX_task_log_protocol"` // 协议 1:http 2:RPC Command string `json:"command" gorm:"type:varchar(300); not null"` // URL地址或shell命令 Timeout int `json:"timeout" gorm:"type:int(11); not null; default 0"` // 任务执行超时时间(单位秒),0不限制 RetryTimes int8 `json:"retryTimes" gorm:"type:int(11); not null; default 0"` // 任务重试次数 HostName string `json:"hostName" gorm:"type:varchar(200); not null; default ''"` // RPC主机名,逗号分隔 StartTime string `json:"startTime" gorm:"type:varchar(50); default null"` // 开始执行时间 EndTime string `json:"endTime" gorm:"type:varchar(50); default null"` // 执行完成(失败)时间 Status int8 `json:"status" gorm:"type:int(11); not null; index:IDX_task_log_status; default 1"` // 状态 0:执行失败 1:执行中 2:执行完毕 3:任务取消(上次任务未执行完成) 4:异步执行 Result string `json:"result" gorm:"type:text; not null"` // 执行结果 TotalTime int `json:"totalTime" gorm:"-"` // 执行总时长 }
任务执行日志
Click to show internal directories.
Click to hide internal directories.