mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Refactor server runJobs function. (#23854)
This commit is contained in:
@@ -511,12 +511,6 @@ func NewServer(options ...Option) (*Server, error) {
|
||||
}
|
||||
|
||||
if s.runEssentialJobs {
|
||||
s.Go(func() {
|
||||
appInstance := New(ServerConnector(s.Channels()))
|
||||
s.runLicenseExpirationCheckJob()
|
||||
runDNDStatusExpireJob(appInstance)
|
||||
runPostReminderJob(appInstance)
|
||||
})
|
||||
s.runJobs()
|
||||
}
|
||||
|
||||
@@ -538,6 +532,12 @@ func NewServer(options ...Option) (*Server, error) {
|
||||
}
|
||||
|
||||
func (s *Server) runJobs() {
|
||||
s.Go(func() {
|
||||
appInstance := New(ServerConnector(s.Channels()))
|
||||
s.runLicenseExpirationCheckJob()
|
||||
runDNDStatusExpireJob(appInstance)
|
||||
runPostReminderJob(appInstance)
|
||||
})
|
||||
s.Go(func() {
|
||||
runSecurityJob(s)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user