PLT-7644: Improve job scheduler architecture. (#7532)

Этот коммит содержится в:
George Goldberg
2017-09-28 17:11:13 +01:00
коммит произвёл Corey Hulen
родитель f263d2b951
Коммит a06830b2f8
9 изменённых файлов: 329 добавлений и 132 удалений

Просмотреть файл

@@ -7,6 +7,7 @@ import (
"encoding/json"
"io"
"net/http"
"time"
)
const (
@@ -116,6 +117,9 @@ type Worker interface {
}
type Scheduler interface {
Run()
Stop()
Name() string
JobType() string
Enabled(cfg *Config) bool
NextScheduleTime(cfg *Config, now time.Time, pendingJobs bool, lastSuccessfulJob *Job) *time.Time
ScheduleJob(cfg *Config, pendingJobs bool, lastSuccessfulJob *Job) (*Job, *AppError)
}