task-processor/cmd/main.go

29 lines
506 B
Go
Raw Normal View History

2026-02-18 17:35:37 +03:00
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(app.Deps{
Config: c,
RootCtx: ctx,
})
if err := appl.Run(); err != nil {
log.WithError(err).Fatal("Application run failed")
}
}