Skip to content

Commit

Permalink
chore(deps): Bumping httputils and reducing number of goroutine
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <bob@vibioh.fr>
  • Loading branch information
ViBiOh committed Jan 7, 2023
1 parent b9612f5 commit cf3fbb6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions cmd/ketchup/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,17 @@ func main() {
publicHandler.ServeHTTP(w, r)
})

doneCtx := healthApp.ContextDone()
doneCtx := healthApp.Done(ctx)

go githubApp.Start(doneCtx)
if schedulerApp != nil {
go schedulerApp.Start(doneCtx)
}

go promServer.Start(healthApp.ContextEnd(), "prometheus", prometheusApp.Handler())
go appServer.Start(healthApp.ContextEnd(), "http", httputils.Handler(appHandler, healthApp, recoverer.Middleware, prometheusApp.Middleware, tracerApp.Middleware, owasp.New(owaspConfig).Middleware, cors.New(corsConfig).Middleware))
endCtx := healthApp.End(ctx)

go promServer.Start(endCtx, "prometheus", prometheusApp.Handler())
go appServer.Start(endCtx, "http", httputils.Handler(appHandler, healthApp, recoverer.Middleware, prometheusApp.Middleware, tracerApp.Middleware, owasp.New(owaspConfig).Middleware, cors.New(corsConfig).Middleware))

healthApp.WaitForTermination(appServer.Done())
server.GracefulWait(appServer.Done(), promServer.Done())
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.19
require (
github.com/ViBiOh/auth/v2 v2.14.20
github.com/ViBiOh/flags v1.2.0
github.com/ViBiOh/httputils/v4 v4.52.0
github.com/ViBiOh/httputils/v4 v4.52.1
github.com/ViBiOh/mailer v1.30.18
github.com/golang/mock v1.6.0
github.com/jackc/pgconn v1.13.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ github.com/ViBiOh/auth/v2 v2.14.20 h1:xCTQrnTOFLiyFLIV0CMXlCPrHEbimganZsbTbdHUh5
github.com/ViBiOh/auth/v2 v2.14.20/go.mod h1:lL4rXpvS0Gtui4CSy0J/AK1pq59XVXaR4Qz1ELsQ3eY=
github.com/ViBiOh/flags v1.2.0 h1:DaujjNXzD29KxKyp4eZdn7c9+uBN5DokWgDAe7DcUmc=
github.com/ViBiOh/flags v1.2.0/go.mod h1:UyMB5zeD/aId7Xw3x7577ZNU298JmukzOcV8p/H2W1s=
github.com/ViBiOh/httputils/v4 v4.52.0 h1:e6LQNhjp8e3gsqTqPruux6UiZDI3Wej/hyWc0IVq9nQ=
github.com/ViBiOh/httputils/v4 v4.52.0/go.mod h1:YA+JJC5yrILqjk+OI9L0emleE2rXD3Q/z6gcS22IZlE=
github.com/ViBiOh/httputils/v4 v4.52.1 h1:0hfZXlwLhTDPRFvcryvrNe6ZUaYnQfrFdB0tnrrf1Vg=
github.com/ViBiOh/httputils/v4 v4.52.1/go.mod h1:YA+JJC5yrILqjk+OI9L0emleE2rXD3Q/z6gcS22IZlE=
github.com/ViBiOh/mailer v1.30.18 h1:56WqAM8RewgkCXYP+jtBnQKjdTobnkappxU7gIErV0E=
github.com/ViBiOh/mailer v1.30.18/go.mod h1:F4YM+ANIsVzXcYqjA3I6JfJCJqC9QB+jirML+XPg4RY=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
Expand Down

0 comments on commit cf3fbb6

Please sign in to comment.