[MM-51467] - NotifyAdmin job reports an error for unlicensed servers (#22568)
* [MM-51467] - Reduce frequency for notify install plugin job * [MM-51467] - NotifyAdmin job reports an error for unlicensed servers * . * fix imports
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5072cd7bdf
Коммит
ee068726bc
@@ -48,12 +48,12 @@ func (a *App) SaveAdminNotification(userId string, notifyData *model.NotifyAdmin
|
||||
|
||||
func (a *App) DoCheckForAdminNotifications(trial bool) *model.AppError {
|
||||
ctx := request.EmptyContext(a.Srv().Log())
|
||||
currentSKU := "starter"
|
||||
license := a.Srv().License()
|
||||
if license == nil {
|
||||
return model.NewAppError("DoCheckForAdminNotifications", "app.notify_admin.send_notification_post.app_error", nil, "No license found", http.StatusInternalServerError)
|
||||
if license != nil {
|
||||
currentSKU = license.SkuShortName
|
||||
}
|
||||
|
||||
currentSKU := license.SkuShortName
|
||||
workspaceName := ""
|
||||
|
||||
return a.SendNotifyAdminPosts(ctx, workspaceName, currentSKU, trial)
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/mattermost/mattermost-server/v6/server/platform/shared/mlog"
|
||||
)
|
||||
|
||||
const installPluginSchedFreq = 1 * time.Minute
|
||||
const installPluginSchedFreq = 24 * time.Hour
|
||||
|
||||
func MakeInstallPluginScheduler(jobServer *jobs.JobServer, license *model.License, jobType string) model.Scheduler {
|
||||
isEnabled := func(cfg *model.Config) bool {
|
||||
|
||||
Ссылка в новой задаче
Block a user