From d221e2109be2bcea84886e6660d2d3ace360403b Mon Sep 17 00:00:00 2001 From: stormofice <58337328+stormofice@users.noreply.github.com> Date: Tue, 3 Oct 2023 22:43:55 +0200 Subject: [PATCH] testing perf --- cmd/mensatt/main.go | 13 ++++++------- internal/images/images.go | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/cmd/mensatt/main.go b/cmd/mensatt/main.go index 1e4abc1..8af7bc4 100644 --- a/cmd/mensatt/main.go +++ b/cmd/mensatt/main.go @@ -16,7 +16,6 @@ import ( "github.com/mensatt/backend/pkg/utils" "log" "path/filepath" - "time" ) func main() { @@ -69,12 +68,12 @@ func main() { sentryOptions.Debug = true } - err = sentry.Init(sentryOptions) - if err != nil { - log.Fatalln("Sentry initialization failed:", err) - } - // Flush buffered events before the program terminates - defer sentry.Flush(2 * time.Second) + // err = sentry.Init(sentryOptions) + // if err != nil { + // log.Fatalln("Sentry initialization failed:", err) + // } + // // Flush buffered events before the program terminates + // defer sentry.Flush(2 * time.Second) // Details for database connection username, err := utils.GetOrFile("DATABASE_USERNAME") diff --git a/internal/images/images.go b/internal/images/images.go index cb8b0ec..7937b2b 100644 --- a/internal/images/images.go +++ b/internal/images/images.go @@ -97,7 +97,7 @@ func imageHandler(ip *imageuploader.ImageUploader) gin.HandlerFunc { return } - data, _, err := img.ExportWebp(&vips.WebpExportParams{Quality: quality}) + data, _, err := img.ExportWebp(&vips.WebpExportParams{}) if err != nil { c.JSON(http.StatusInternalServerError, gin.H{"error": "error exporting image"}) return