Skip to content

Commit

Permalink
feat: adjust maxprocs
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan1993spb committed Jan 15, 2024
1 parent e9cf762 commit 2a7a69b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/snake-bot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os/signal"

"github.com/spf13/afero"
_ "go.uber.org/automaxprocs"
"go.uber.org/automaxprocs/maxprocs"

"github.com/ivan1993spb/snake-bot/internal/app"
"github.com/ivan1993spb/snake-bot/internal/config"
Expand All @@ -27,6 +27,11 @@ func main() {
log.WithError(err).Fatal("config fail")
}

_, err = maxprocs.Set(maxprocs.Logger(log.Infof))
if err != nil {
log.WithError(err).Fatal("maxprocs fail")
}

application := &app.App{
Config: cfg,
Fs: afero.NewOsFs(),
Expand Down

0 comments on commit 2a7a69b

Please sign in to comment.