task-processor/cmd/main.go
2026-02-21 17:00:18 +03:00

25 lines
473 B
Go

package main
import (
"context"
log "github.com/sirupsen/logrus"
"os"
"os/signal"
"syscall"
"task-processor/config"
"task-processor/internal/app"
)
func main() {
c := config.NewConfig()
config.LogSetup(c.App.Mode, c.App.LogLvl)
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer cancel()
appl := app.NewApp(ctx, c)
if err := appl.Run(ctx); err != nil {
log.WithError(err).Fatal("Application run failed")
}
}