Documentation ¶
Index ¶
- Constants
- func NewSyncBuffer(fd *os.File) *syncBuffer
- type Job
- type JobStatus
- type Manager
- func (m *Manager) ClearLogs(job *Job) error
- func (m *Manager) CronClearInstanceCache()
- func (m *Manager) CronClearUploadFiles()
- func (m *Manager) CronStatusJob()
- func (m *Manager) ExecJob(modelJob *models.Job) error
- func (m *Manager) GetJob(id int) (*Job, bool)
- func (m *Manager) GetJobList() *utils.SafeMap
- func (m *Manager) Init() *Manager
- func (m *Manager) NewJob(id int, name, cmd, spec, cmdType string, cmdId int, host []*models.Host) *Job
- func (m *Manager) NewRealJob(modelJob *models.Job) (*Job, error)
- func (m *Manager) NewRealJobWithRegister(modelJob *models.Job, status string) (*Job, error)
- func (m *Manager) RemoveJob(id int) error
- func (m *Manager) ScheduleJob(job *Job) error
- func (m *Manager) StartJob(modelJob *models.Job) error
- func (m *Manager) StopJob(id int) error
- func (m *Manager) UnRegister(id int, clear bool) error
Constants ¶
View Source
const ( JobStatusSchedule JobStatus = "schedule" JobStatusStopped JobStatus = "stopped" MarkText = "###mark###" ErrorText = "[error]" DoneMartText = "###done###" )
View Source
const (
DefaultTempDate = 14 * 24 * time.Hour
)
Variables ¶
This section is empty.
Functions ¶
func NewSyncBuffer ¶
Types ¶
type Job ¶
type Job struct { ID int // contains filtered or unexported fields }
Job is cron task or long task
func (*Job) UpdateStatus ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) CronClearInstanceCache ¶
func (m *Manager) CronClearInstanceCache()
CronClearInstanceCache clear instance cache
func (*Manager) CronClearUploadFiles ¶
func (m *Manager) CronClearUploadFiles()
CronClearUploadFiles clear upload file
func (*Manager) NewRealJob ¶
NewRealJob 新建一个job
func (*Manager) NewRealJobWithRegister ¶
NewRealJobWithRegister 新建一个job并注册到task poll
Click to show internal directories.
Click to hide internal directories.