Skip to content

Commit

Permalink
fix temp path for validate
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Apr 25, 2024
1 parent 5478f0c commit d09a9e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flow/connectors/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/google/uuid"
"go.temporal.io/sdk/log"

metadataStore "github.com/PeerDB-io/peer-flow/connectors/external_metadata"
Expand Down Expand Up @@ -81,7 +82,8 @@ func (c *S3Connector) Close() error {
func PutAndRemoveS3(ctx context.Context, client *s3.Client, bucket string, prefix string) error {
reader := strings.NewReader(time.Now().Format(time.RFC3339))
bucketName := aws.String(bucket)
temporaryObjectPath := prefix + _peerDBCheck
temporaryObjectPath := prefix + "/" + _peerDBCheck + uuid.New().String()
temporaryObjectPath = strings.TrimPrefix(temporaryObjectPath, "/")
_, putErr := client.PutObject(ctx, &s3.PutObjectInput{
Bucket: bucketName,
Key: aws.String(temporaryObjectPath),
Expand Down

0 comments on commit d09a9e8

Please sign in to comment.