Skip to content

Commit

Permalink
Temp dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Nemere committed Dec 9, 2024
1 parent e46577b commit e1a08bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/lambdas/data-import/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ func HandleRequest(ctx context.Context, event awsutil.Event) (string, error) {
// and it'll be useful for initial debugging
fmt.Printf("ImportForTrigger: \"%v\"\n", record.SNS.Message)

err = os.Chdir(os.TempDir())
if err != nil {
fmt.Printf("Failed to change to temp dir: %v\n", err)
}

freeBytes, err := utils.GetDiskAvailableBytes()
if err != nil {
fmt.Printf("Failed to read disk free space: %v\n", err)
Expand Down

0 comments on commit e1a08bc

Please sign in to comment.