Skip to content

Commit

Permalink
Kill database after upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Aug 24, 2023
1 parent 925f6a5 commit 17e9489
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/internal/database/meilisearch/meilisearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,17 @@ func (db *Meilisearch) Upgrade() error {
}
}()

retry.Do(func() error {
err = retry.Do(func() error {
v, err := db.client.Version()
if err != nil {
return err
}
db.log.Infow("meilisearch started after upgrade, killing it", "version", v)
return cmd.Process.Signal(syscall.SIGTERM)
})
if err != nil {
return err
}

db.log.Infow("upgrade done and new data in place", "took", time.Since(start))
return nil
Expand Down

0 comments on commit 17e9489

Please sign in to comment.