mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-12849 Moving all non request scoped items to Server struct (#9806)
* Moving goroutine pool * Auto refactor * Moving plugins. * Auto refactor * Moving fields to server * Auto refactor * Removing siteurl duplication. * Moving reset of app fields * Auto refactor * Formatting * Moving niling of Server to after last use * Fixing unit tests.
This commit is contained in:
committed by
GitHub
parent
0dcbecac87
commit
ecade2f1ec
@@ -44,12 +44,12 @@ func jobserverCmdF(command *cobra.Command, args []string) {
|
||||
defer mlog.Info("Stopped Mattermost job server")
|
||||
|
||||
if !noJobs {
|
||||
a.Jobs.StartWorkers()
|
||||
defer a.Jobs.StopWorkers()
|
||||
a.Srv.Jobs.StartWorkers()
|
||||
defer a.Srv.Jobs.StopWorkers()
|
||||
}
|
||||
if !noSchedule {
|
||||
a.Jobs.StartSchedulers()
|
||||
defer a.Jobs.StopSchedulers()
|
||||
a.Srv.Jobs.StartSchedulers()
|
||||
defer a.Srv.Jobs.StopSchedulers()
|
||||
}
|
||||
|
||||
signalChan := make(chan os.Signal, 1)
|
||||
|
||||
@@ -147,19 +147,19 @@ func runServer(configFileLocation string, disableConfigWatch bool, usedPlatform
|
||||
manualtesting.Init(api)
|
||||
}
|
||||
|
||||
a.Go(func() {
|
||||
a.Srv.Go(func() {
|
||||
runSecurityJob(a)
|
||||
})
|
||||
a.Go(func() {
|
||||
a.Srv.Go(func() {
|
||||
runDiagnosticsJob(a)
|
||||
})
|
||||
a.Go(func() {
|
||||
a.Srv.Go(func() {
|
||||
runSessionCleanupJob(a)
|
||||
})
|
||||
a.Go(func() {
|
||||
a.Srv.Go(func() {
|
||||
runTokenCleanupJob(a)
|
||||
})
|
||||
a.Go(func() {
|
||||
a.Srv.Go(func() {
|
||||
runCommandWebhookCleanupJob(a)
|
||||
})
|
||||
|
||||
@@ -181,12 +181,12 @@ func runServer(configFileLocation string, disableConfigWatch bool, usedPlatform
|
||||
}
|
||||
|
||||
if *a.Config().JobSettings.RunJobs {
|
||||
a.Jobs.StartWorkers()
|
||||
defer a.Jobs.StopWorkers()
|
||||
a.Srv.Jobs.StartWorkers()
|
||||
defer a.Srv.Jobs.StopWorkers()
|
||||
}
|
||||
if *a.Config().JobSettings.RunScheduler {
|
||||
a.Jobs.StartSchedulers()
|
||||
defer a.Jobs.StopSchedulers()
|
||||
a.Srv.Jobs.StartSchedulers()
|
||||
defer a.Srv.Jobs.StopSchedulers()
|
||||
}
|
||||
|
||||
notifyReady()
|
||||
|
||||
Reference in New Issue
Block a user