task-processor/cmd/main.go
nquidox 8395cf71b4
All checks were successful
/ Make image (push) Successful in 49s
pprof
2026-02-28 23:33:37 +03:00

33 lines
560 B
Go

package main
import (
"context"
log "github.com/sirupsen/logrus"
"net/http"
_ "net/http/pprof"
"os"
"os/signal"
"syscall"
"task-processor/config"
"task-processor/internal/app"
"task-processor/internal/logging"
)
func main() {
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer cancel()
c := config.NewConfig()
logging.LogSetup(c.LogLevel)
if c.Metrics.GinMode != "release" {
go func() {
log.Println(http.ListenAndServe("localhost:6060", nil))
}()
}
appl := app.New(c)
appl.Run(ctx)
}