Skip to content

Commit

Permalink
delete tars after use
Browse files Browse the repository at this point in the history
  • Loading branch information
nikooo777 committed Nov 25, 2021
1 parent 6e819b2 commit 75628d8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion manager/s3_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ func (s *Sync) downloadBlockchainDB() error {
if err != nil {
return errors.Prefix("error extracting blockchain.db files", err)
}

err = os.Remove(defaultTempBDBPath)
if err != nil {
return errors.Err(err)
}
log.Printf("blockchain.db data downloaded and extracted to %s", blockchainDbDir)
return nil
}
Expand Down Expand Up @@ -264,5 +267,9 @@ func (s *Sync) uploadBlockchainDB() error {
return err
}
log.Println("blockchain.db files uploaded to S3")
err = os.Remove(tarPath)
if err != nil {
return errors.Err(err)
}
return os.Remove(defaultBDBDir)
}

0 comments on commit 75628d8

Please sign in to comment.