context fix
This commit is contained in:
parent
4665c90c2c
commit
c955615fb1
8 changed files with 39 additions and 52 deletions
|
|
@ -1,17 +1,24 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"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)
|
||||
|
||||
appl := app.New(c)
|
||||
|
||||
appl.Run()
|
||||
appl.Run(ctx)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue