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.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0dcbecac87
Коммит
ecade2f1ec
@@ -17,11 +17,11 @@ func StoreOverride(override interface{}) Option {
|
||||
return func(a *App) {
|
||||
switch o := override.(type) {
|
||||
case store.Store:
|
||||
a.newStore = func() store.Store {
|
||||
a.Srv.newStore = func() store.Store {
|
||||
return o
|
||||
}
|
||||
case func(*App) store.Store:
|
||||
a.newStore = func() store.Store {
|
||||
a.Srv.newStore = func() store.Store {
|
||||
return o(a)
|
||||
}
|
||||
default:
|
||||
@@ -32,10 +32,10 @@ func StoreOverride(override interface{}) Option {
|
||||
|
||||
func ConfigFile(file string) Option {
|
||||
return func(a *App) {
|
||||
a.configFile = file
|
||||
a.Srv.configFile = file
|
||||
}
|
||||
}
|
||||
|
||||
func DisableConfigWatch(a *App) {
|
||||
a.disableConfigWatch = true
|
||||
a.Srv.disableConfigWatch = true
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user