Documentation
¶
Index ¶
- func GetJobDB(db *gorm.DB) *gorm.DB
- type Job
- func (m *Job) BatchDelete(db *gorm.DB, ids []int) error
- func (m *Job) Create(db *gorm.DB, item Job) error
- func (m *Job) Delete(db *gorm.DB, id int) error
- func (m *Job) Get(db *gorm.DB) (*Job, error)
- func (m *Job) GetWithStatus(db *gorm.DB, status int) ([]*Job, error)
- func (m *Job) Query(db *gorm.DB, params param.JobParam) (*pagination.Result, error)
- func (m *Job) RemoveAllEntryID(db *gorm.DB) error
- func (m *Job) RemoveJob(db *gorm.DB) error
- func (m *Job) StartJob(db *gorm.DB) error
- func (m *Job) Update(db *gorm.DB, item Job) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Job ¶
type Job struct {
JobID uint `json:"jobId" gorm:"primary_key;AUTO_INCREMENT;"` // 编码
JobName string `json:"jobName" gorm:"size:255;"` // 名称
JobGroup string `json:"jobGroup" gorm:"size:255;"` // 任务分组
JobType int `json:"jobType" gorm:"size:1;"` // 任务类型
CronExpression string `json:"cronExpression" gorm:"size:255;"` // cron表达式
InvokeTarget string `json:"invokeTarget" gorm:"size:255;"` // 调用目标
Args string `json:"args" gorm:"size:255;"` // 目标参数
MisfirePolicy int `json:"misfirePolicy" gorm:"size:255;"` // 执行策略
Concurrent int `json:"concurrent" gorm:"size:1;"` // 是否并发
Status int `json:"status" gorm:"size:1;"` // 状态
EntryID int `json:"entry_id" gorm:"size:11;index:idx_entry_id;"` // job启动时返回的id
CreatedBy string `json:"createdBy" gorm:"size:64;index;comment:'创建人'"` // 创建人
UpdatedBy string `json:"updatedBy" gorm:"size:64;index;comment:'更新人'"` // 更新人
gormx.Model
DataScope string `json:"dataScope" gorm:"-"`
}
Job 定时任务实体
func (*Job) GetWithStatus ¶
GetWithStatus 根据状态获取任务
func (*Job) RemoveAllEntryID ¶
RemoveAllEntryID 移除所有任务EntryID
Click to show internal directories.
Click to hide internal directories.