Skip to content

Commit

Permalink
fix(meili): wait more patiently (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
vknabel committed Mar 27, 2024
1 parent 42e5787 commit 9ab45f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/internal/database/meilisearch/meilisearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,13 @@ func (db *Meilisearch) Backup(ctx context.Context) error {

dumpTask, err := db.client.WaitForTask(dumpResponse.TaskUID, meilisearch.WaitParams{
Context: ctx,
Interval: time.Millisecond * 50,
Interval: time.Second,
})
if err != nil {
return err
}
db.log.Info("dump created successfully", "duration", dumpTask.Duration)
dumpDuration := dumpTask.FinishedAt.Sub(dumpTask.EnqueuedAt)
db.log.Info("dump created successfully", "duration", dumpDuration.String())

dumps, err := filepath.Glob(constants.BackupDir + "/*.dump")
if err != nil {
Expand Down

0 comments on commit 9ab45f9

Please sign in to comment.