task-processor/cmd/main.go

26 lines
473 B
Go
Raw Permalink 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()
2026-02-21 17:00:18 +03:00
appl := app.NewApp(ctx, c)
2026-02-18 17:35:37 +03:00
2026-02-21 17:00:18 +03:00
if err := appl.Run(ctx); err != nil {
2026-02-18 17:35:37 +03:00
log.WithError(err).Fatal("Application run failed")
}
}