Merge pull request 'Remove redundant / deadcode error check' (#3144) from gusted/forgejo-rm-deadcode into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3144
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
Earl Warren 2024-04-10 17:39:35 +00:00
commit c20285aa9d

View file

@ -181,12 +181,6 @@ func Init() {
}()
rIndexer = elasticsearch.NewIndexer(setting.Indexer.RepoConnStr, setting.Indexer.RepoIndexerName)
if err != nil {
cancel()
(*globalIndexer.Load()).Close()
close(waitChannel)
log.Fatal("PID: %d Unable to create the elasticsearch Repository Indexer connstr: %s Error: %v", os.Getpid(), setting.Indexer.RepoConnStr, err)
}
existed, err = rIndexer.Init(ctx)
if err != nil {
cancel()