Refactor code to use 'any' type and improve context handling
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
)
|
||||
@@ -19,6 +18,8 @@ func (h *Handler) UpdateCleanup(w http.ResponseWriter, r *http.Request) {
|
||||
if h.denyLegacyAPI(w, "/api/cleanup/updates") {
|
||||
return
|
||||
}
|
||||
ctx, cancel := withRequestTimeout(r, defaultRequestTimeout)
|
||||
defer cancel()
|
||||
|
||||
/*
|
||||
// Get the current time
|
||||
@@ -35,11 +36,11 @@ func (h *Handler) UpdateCleanup(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
h.Logger.Debug("database params", "params", params)
|
||||
err := h.Database.Queries().CleanupUpdates(context.Background(), params)
|
||||
err := h.Database.Queries().CleanupUpdates(ctx, params)
|
||||
*/
|
||||
|
||||
//err := h.Database.Queries().InventoryCleanupTemplates(context.Background())
|
||||
err := h.Database.Queries().CleanupUpdatesNullVm(context.Background())
|
||||
//err := h.Database.Queries().InventoryCleanupTemplates(ctx)
|
||||
err := h.Database.Queries().CleanupUpdatesNullVm(ctx)
|
||||
|
||||
if err != nil {
|
||||
h.Logger.Error("Error received cleaning updates table", "error", err)
|
||||
|
||||
Reference in New Issue
Block a user