diff --git a/internal/cmd/scheduler.go b/internal/cmd/scheduler.go index d00d6b5..32b93fc 100644 --- a/internal/cmd/scheduler.go +++ b/internal/cmd/scheduler.go @@ -4,6 +4,8 @@ import ( "context" "encoding/json" "fmt" + "net/http" + _ "net/http/pprof" "strconv" "time" @@ -100,6 +102,9 @@ func SchedulerCmd(ctx context.Context) *cobra.Command { _, _ = s.Every(1).Minute().Do(func() { pruneDevices(ctx, logger, db) }) s.StartAsync() + srv := &http.Server{Addr: ":8080"} + go func() { _ = srv.ListenAndServe() }() + <-ctx.Done() s.Stop()