diff options
author | Wim <wim@42.be> | 2022-04-01 00:23:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-01 00:23:19 +0200 |
commit | c6716e030c02f316b887c1d3ee4b443aa3ab6afd (patch) | |
tree | 470461fe2d29662e7a69834ed21fce30beed65ab /vendor/github.com/mattermost/mattermost-server/v6/model/job.go | |
parent | 4ab72acec656dafd304f88359b509b1f27c06604 (diff) | |
download | matterbridge-msglm-c6716e030c02f316b887c1d3ee4b443aa3ab6afd.tar.gz matterbridge-msglm-c6716e030c02f316b887c1d3ee4b443aa3ab6afd.tar.bz2 matterbridge-msglm-c6716e030c02f316b887c1d3ee4b443aa3ab6afd.zip |
Update dependencies (#1784)
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.go | 26 |
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) |