Skip to content

Commit

Permalink
fix(export): delete temporary export directory after completion of re…
Browse files Browse the repository at this point in the history
…mote export (#9206)
  • Loading branch information
shivaji-kharse authored Nov 4, 2024
1 parent 237dd74 commit e5ad869
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions worker/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,14 @@ func (r *remoteExportStorage) OpenFile(fileName string) (*ExportWriter, error) {
}

func (r *remoteExportStorage) FinishWriting(w *Writers) (ExportedFiles, error) {

defer func() {
glog.Infof("Deleting temporary export directory %s\n", r.les.destination)
if err := os.RemoveAll(r.les.destination); err != nil {
glog.Errorf("error deleting temporary export directory: %w", err)
}
}()

files, err := r.les.FinishWriting(w)
if err != nil {
return nil, err
Expand Down

0 comments on commit e5ad869

Please sign in to comment.