Skip to content

Commit

Permalink
Update cmd/jaeger/internal/integration/storagecleaner/extension.go
Browse files Browse the repository at this point in the history
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Signed-off-by: Harshvir Potpose <122517264+akagami-harsh@users.noreply.github.com>
  • Loading branch information
akagami-harsh and yurishkuro committed Apr 22, 2024
1 parent f35a6a4 commit 4ef7ad8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/jaeger/internal/integration/storagecleaner/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ func (c *storageCleaner) Start(ctx context.Context, host component.Host) error {
}

purgeStorage := func() error {
purger := storageFactory.(storage.Purger)
purger, ok := storageFactory.(storage.Purger)
if !ok {
return fmt.Errorf("storage %s does not implement Purger interface", c.config.TraceStorage)
}
if err := purger.Purge(); err != nil {
return fmt.Errorf("error purging Badger storage: %w", err)
}
Expand Down

0 comments on commit 4ef7ad8

Please sign in to comment.