Skip to content

Commit

Permalink
clean resources
Browse files Browse the repository at this point in the history
  • Loading branch information
rjtokenring committed Sep 17, 2024
1 parent 48ba375 commit 19f348f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/importer/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package importer
import (
"context"
"fmt"
"os"

"github.com/arduino/aws-s3-integration/business/tsextractor"
"github.com/arduino/aws-s3-integration/internal/iot"
Expand Down Expand Up @@ -77,6 +78,7 @@ func StartImport(ctx context.Context, logger *logrus.Entry, key, secret, orgid s
fileToUpload = compressedFile
logger.Infof("Generated compressed file: %s\n", fileToUpload)
destinationKeyFormat = "%s/%s.csv.gz"
defer func(f string) { os.Remove(f) }(fileToUpload)
}

destinationKey := fmt.Sprintf(destinationKeyFormat, from.Format("2006-01-02"), from.Format("2006-01-02-15-04"))
Expand Down

0 comments on commit 19f348f

Please sign in to comment.