summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/mattermost-server/v6/model/job.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/mattermost/mattermost-server/v6/model/job.go')
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/job.go26
1 files changed, 1 insertions, 25 deletions
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/job.go b/vendor/github.com/mattermost/mattermost-server/v6/model/job.go
index e892b051..8b6272e8 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/job.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/job.go
@@ -78,29 +78,6 @@ func (j *Job) IsValid() *AppError {
return NewAppError("Job.IsValid", "model.job.is_valid.create_at.app_error", nil, "id="+j.Id, http.StatusBadRequest)
}
- switch j.Type {
- case JobTypeDataRetention:
- case JobTypeElasticsearchPostIndexing:
- case JobTypeElasticsearchPostAggregation:
- case JobTypeBlevePostIndexing:
- case JobTypeLdapSync:
- case JobTypeMessageExport:
- case JobTypeMigrations:
- case JobTypePlugins:
- case JobTypeProductNotices:
- case JobTypeExpiryNotify:
- case JobTypeActiveUsers:
- case JobTypeImportProcess:
- case JobTypeImportDelete:
- case JobTypeExportProcess:
- case JobTypeExportDelete:
- case JobTypeCloud:
- case JobTypeResendInvitationEmail:
- case JobTypeExtractContent:
- default:
- return NewAppError("Job.IsValid", "model.job.is_valid.type.app_error", nil, "id="+j.Id, http.StatusBadRequest)
- }
-
switch j.Status {
case JobStatusPending:
case JobStatusInProgress:
@@ -119,11 +96,10 @@ type Worker interface {
Run()
Stop()
JobChannel() chan<- Job
+ IsEnabled(cfg *Config) bool
}
type Scheduler interface {
- 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)