[MM-54132] Use annotated logger for log messages from jobs (#24275)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
fcfcbd9909
Коммит
30b12f199b
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/shared/request"
|
||||
)
|
||||
|
||||
// Default polling interval for jobs termination.
|
||||
@@ -67,7 +68,7 @@ func (watcher *Watcher) Stop() {
|
||||
}
|
||||
|
||||
func (watcher *Watcher) PollAndNotify() {
|
||||
jobs, err := watcher.srv.Store.Job().GetAllByStatus(model.JobStatusPending)
|
||||
jobs, err := watcher.srv.Store.Job().GetAllByStatus(request.EmptyContext(watcher.srv.logger), model.JobStatusPending)
|
||||
if err != nil {
|
||||
mlog.Error("Error occurred getting all pending statuses.", mlog.Err(err))
|
||||
return
|
||||
|
||||
Ссылка в новой задаче
Block a user