Combines the following repositories into one: https://github.com/mattermost/mattermost-server https://github.com/mattermost/mattermost-webapp https://github.com/mattermost/focalboard https://github.com/mattermost/mattermost-plugin-playbooks
21 строка
523 B
Go
21 строка
523 B
Go
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
package scheduler
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/mattermost/mattermost-server/v6/model"
|
|
"github.com/mattermost/mattermost-server/v6/server/channels/jobs"
|
|
)
|
|
|
|
const schedFreq = 24 * time.Hour
|
|
|
|
func MakeScheduler(jobServer *jobs.JobServer) model.Scheduler {
|
|
isEnabled := func(cfg *model.Config) bool {
|
|
return true
|
|
}
|
|
return jobs.NewPeriodicScheduler(jobServer, model.JobTypePlugins, schedFreq, isEnabled)
|
|
}
|