[MM-34179] app: move cluster registeration to server creation (#17306)
* app: move cluster registeration to server creation * initserver via fakeapp * reflect review comments
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
756f5fbff3
Коммит
e13d85d8c7
@@ -111,6 +111,13 @@ func runServer(configStore *config.Store, usedPlatform bool, interruptChan chan
|
||||
return serverErr
|
||||
}
|
||||
|
||||
// TODO: remove this and handle all required initialization while creating
|
||||
// the server. In theory, we shouldn't depend on App to have a fully-featured
|
||||
// server. This initialization is added so that cluster handlers are registered
|
||||
// and job schedulers are initialized.
|
||||
fakeApp := app.New(app.ServerConnector(server))
|
||||
fakeApp.InitServer()
|
||||
|
||||
// If we allow testing then listen for manual testing URL hits
|
||||
if *server.Config().ServiceSettings.EnableTesting {
|
||||
manualtesting.Init(api)
|
||||
|
||||
Ссылка в новой задаче
Block a user