Skip to content

Commit

Permalink
Log file sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
vegarsti committed Feb 15, 2024
1 parent eca5a23 commit 19192db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/lambda/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ func getTable(file *extract.File) ([][]string, error) {
return nil
})
// Upload the image with boxes to S3
log.Printf("len of file.BytesWithBoxes: %d", len(file.BytesWithBoxes))
if file.ContentType == extract.PNG && len(file.BytesWithBoxes) > 0 {
g.Go(func() error {
startUpload := time.Now()
Expand All @@ -239,10 +240,11 @@ func getTable(file *extract.File) ([][]string, error) {
return nil
})
}
log.Printf("len of file.BytesWithRowBoxes: %d", len(file.BytesWithRowBoxes))
if file.ContentType == extract.PNG && len(file.BytesWithRowBoxes) > 0 {
g.Go(func() error {
startUpload := time.Now()
if err := s3.UploadPNG(file.Checksum+"_rows", file.BytesWithBoxes); err != nil {
if err := s3.UploadPNG(file.Checksum+"_rows", file.BytesWithRowBoxes); err != nil {
return err
}
log.Printf("s3 png %s", time.Since(startUpload).String())
Expand Down

0 comments on commit 19192db

Please sign in to comment.