[MM-35470] Disable config watching logic (#17913)
* Disable config watching logic * Fix tests
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b01f8ab0c8
Коммит
186475db3b
@@ -43,9 +43,9 @@ func StoreOverride(override interface{}) Option {
|
||||
// or a database connection string. It receives as well a set of
|
||||
// custom defaults that will be applied for any unset property of the
|
||||
// config loaded from the dsn on top of the normal defaults
|
||||
func Config(dsn string, watch, readOnly bool, configDefaults *model.Config) Option {
|
||||
func Config(dsn string, readOnly bool, configDefaults *model.Config) Option {
|
||||
return func(s *Server) error {
|
||||
configStore, err := config.NewStoreFromDSN(dsn, watch, readOnly, configDefaults)
|
||||
configStore, err := config.NewStoreFromDSN(dsn, readOnly, configDefaults)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to apply Config option")
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ func NewServer(options ...Option) (*Server, error) {
|
||||
}
|
||||
|
||||
if s.configStore == nil {
|
||||
innerStore, err := config.NewFileStore("config.json", true)
|
||||
innerStore, err := config.NewFileStore("config.json")
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to load config")
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ func TestStartServerNoS3Bucket(t *testing.T) {
|
||||
s3Endpoint := fmt.Sprintf("%s:%s", s3Host, s3Port)
|
||||
|
||||
s, err := NewServer(func(server *Server) error {
|
||||
configStore, _ := config.NewFileStore("config.json", true)
|
||||
configStore, _ := config.NewFileStore("config.json")
|
||||
store, _ := config.NewStoreFromBacking(configStore, nil, false)
|
||||
server.configStore = store
|
||||
server.UpdateConfig(func(cfg *model.Config) {
|
||||
|
||||
Ссылка в новой задаче
Block a user