Documentation ¶
Index ¶
- Constants
- func CancellationWatcher(ctx context.Context, jobId string, cancelChan chan interface{})
- func ClaimJob(job *model.Job) (bool, *model.AppError)
- func CreateJob(jobType string, jobData map[string]string) (*model.Job, *model.AppError)
- func RequestCancellation(jobId string) *model.AppError
- func SetJobCanceled(job *model.Job) *model.AppError
- func SetJobError(job *model.Job, jobError *model.AppError) *model.AppError
- func SetJobProgress(job *model.Job, progress int64) *model.AppError
- func SetJobSuccess(job *model.Job) *model.AppError
- type JobServer
- type Schedulers
- type TestScheduler
- type TestWorker
- type Watcher
- type Workers
Constants ¶
View Source
const (
CANCEL_WATCHER_POLLING_INTERVAL = 5000
)
View Source
const (
WATCHER_POLLING_INTERVAL = 15000
)
Variables ¶
This section is empty.
Functions ¶
func CancellationWatcher ¶
func RequestCancellation ¶
Types ¶
type JobServer ¶
type JobServer struct { Store store.Store Workers *Workers Schedulers *Schedulers }
var Srv JobServer
func (*JobServer) LoadLicense ¶
func (server *JobServer) LoadLicense()
func (*JobServer) StartSchedulers ¶
func (server *JobServer) StartSchedulers()
func (*JobServer) StartWorkers ¶
func (server *JobServer) StartWorkers()
func (*JobServer) StopSchedulers ¶
func (server *JobServer) StopSchedulers()
func (*JobServer) StopWorkers ¶
func (server *JobServer) StopWorkers()
type Schedulers ¶
type Schedulers struct { DataRetention model.Scheduler ElasticsearchAggregation model.Scheduler // contains filtered or unexported fields }
func InitSchedulers ¶
func InitSchedulers() *Schedulers
func (*Schedulers) Start ¶
func (schedulers *Schedulers) Start() *Schedulers
func (*Schedulers) Stop ¶
func (schedulers *Schedulers) Stop() *Schedulers
type TestScheduler ¶
type TestScheduler struct {
// contains filtered or unexported fields
}
func MakeTestScheduler ¶
func MakeTestScheduler(name string, jobType string) *TestScheduler
func (*TestScheduler) AddJob ¶
func (scheduler *TestScheduler) AddJob()
func (*TestScheduler) Run ¶
func (scheduler *TestScheduler) Run()
func (*TestScheduler) Stop ¶
func (scheduler *TestScheduler) Stop()
type TestWorker ¶
type TestWorker struct {
// contains filtered or unexported fields
}
func MakeTestWorker ¶
func MakeTestWorker(name string) *TestWorker
func (*TestWorker) DoJob ¶
func (worker *TestWorker) DoJob(job *model.Job)
func (*TestWorker) JobChannel ¶
func (worker *TestWorker) JobChannel() chan<- model.Job
func (*TestWorker) Run ¶
func (worker *TestWorker) Run()
func (*TestWorker) Stop ¶
func (worker *TestWorker) Stop()
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
func MakeWatcher ¶
func (*Watcher) PollAndNotify ¶
func (watcher *Watcher) PollAndNotify()
Click to show internal directories.
Click to hide internal directories.