Skip to content

Commit

Permalink
Revert "truncate file date to hour if scheduling is"
Browse files Browse the repository at this point in the history
This reverts commit ddb51d7.
  • Loading branch information
rjtokenring committed Sep 13, 2024
1 parent ddb51d7 commit e44a758
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions business/tsextractor/tsextractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,7 @@ func (a *TsExtractor) ExportTSToS3(
writer.Close()
defer writer.Delete()

var formattedFrom string
if resolution == 3600 {
formattedFrom = from.Format("2006-01-02-15-00")
} else if resolution > 3600 {
formattedFrom = from.Format("2006-01-02-00-00")
} else {
formattedFrom = from.Format("2006-01-02-15-04")
}
destinationKey := fmt.Sprintf("%s/%s.csv", from.Format("2006-01-02"), formattedFrom)
destinationKey := fmt.Sprintf("%s/%s.csv", from.Format("2006-01-02"), from.Format("2006-01-02-15-04"))
a.logger.Infof("Uploading file %s to bucket %s\n", destinationKey, s3cl.DestinationBucket())
if err := s3cl.WriteFile(ctx, destinationKey, writer.GetFilePath()); err != nil {
return err
Expand Down

0 comments on commit e44a758

Please sign in to comment.