jobs

package
v4.2.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2017 License: AGPL-3.0, Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 CancellationWatcher(ctx context.Context, jobId string, cancelChan chan interface{})

func ClaimJob

func ClaimJob(job *model.Job) (bool, *model.AppError)

func CreateJob

func CreateJob(jobType string, jobData map[string]string) (*model.Job, *model.AppError)

func RequestCancellation

func RequestCancellation(jobId string) *model.AppError

func SetJobCanceled

func SetJobCanceled(job *model.Job) *model.AppError

func SetJobError

func SetJobError(job *model.Job, jobError *model.AppError) *model.AppError

func SetJobProgress

func SetJobProgress(job *model.Job, progress int64) *model.AppError

func SetJobSuccess

func SetJobSuccess(job *model.Job) *model.AppError

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 MakeWatcher(workers *Workers) *Watcher

func (*Watcher) PollAndNotify

func (watcher *Watcher) PollAndNotify()

func (*Watcher) Start

func (watcher *Watcher) Start()

func (*Watcher) Stop

func (watcher *Watcher) Stop()

type Workers

type Workers struct {
	DataRetention            model.Worker
	ElasticsearchIndexing    model.Worker
	ElasticsearchAggregation model.Worker
	// contains filtered or unexported fields
}

func InitWorkers

func InitWorkers() *Workers

func (*Workers) Start

func (workers *Workers) Start() *Workers

func (*Workers) Stop

func (workers *Workers) Stop() *Workers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL