* Add metrics for mobile versions snapshots * Add notifications disabled and fix lint * Address feedback * Verify all references to JobTypeActiveUsers * Fix typos * Improve platform values * Add test and MySQL support
21 строка
592 B
Go
21 строка
592 B
Go
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
package mobile_session_metadata
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/mattermost/mattermost/server/public/model"
|
|
"github.com/mattermost/mattermost/server/v8/channels/jobs"
|
|
)
|
|
|
|
const schedFreq = 24 * time.Hour
|
|
|
|
func MakeScheduler(jobServer *jobs.JobServer) *jobs.PeriodicScheduler {
|
|
isEnabled := func(cfg *model.Config) bool {
|
|
return *cfg.MetricsSettings.EnableClientMetrics
|
|
}
|
|
return jobs.NewPeriodicScheduler(jobServer, model.JobTypeMobileSessionMetadata, schedFreq, isEnabled)
|
|
}
|