mirror of
https://github.com/pgsty/minio.git
synced 2026-10-07 10:15:58 +03:00
initialize streaming events without lazy initialization (#16016)
This commit is contained in:
@@ -349,9 +349,6 @@ func (target *ElasticsearchTarget) initElasticsearch() error {
|
||||
return err
|
||||
}
|
||||
|
||||
if target.store != nil {
|
||||
streamEventsFromStore(target.store, target, target.quitCh, target.loggerOnce)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -366,13 +363,19 @@ func NewElasticsearchTarget(id string, args ElasticsearchArgs, loggerOnce logger
|
||||
}
|
||||
}
|
||||
|
||||
return &ElasticsearchTarget{
|
||||
target := &ElasticsearchTarget{
|
||||
id: event.TargetID{ID: id, Name: "elasticsearch"},
|
||||
args: args,
|
||||
store: store,
|
||||
loggerOnce: loggerOnce,
|
||||
quitCh: make(chan struct{}),
|
||||
}, nil
|
||||
}
|
||||
|
||||
if target.store != nil {
|
||||
streamEventsFromStore(target.store, target, target.quitCh, target.loggerOnce)
|
||||
}
|
||||
|
||||
return target, nil
|
||||
}
|
||||
|
||||
// ES Client definitions and methods
|
||||
|
||||
Reference in New Issue
Block a user