feat: add graceful shutdown
This commit is contained in:
parent
02c790803a
commit
1d7dd6299c
1 changed files with 1 additions and 0 deletions
1
main.go
1
main.go
|
@ -53,6 +53,7 @@ func main() {
|
|||
sessionUC := sessionsUseCase.NewUseCase(sessionRepo, cfg)
|
||||
|
||||
gserver := grpc.NewServer(grpc.UnaryInterceptor(usersDelivery.TokenInterceptor(sessionUC)))
|
||||
defer gserver.GracefulStop()
|
||||
|
||||
usersDelivery.NewUserHandlers(gserver, userUC)
|
||||
sessionsDelivery.NewSessionHandlers(gserver, sessionUC, userUC)
|
||||
|
|
Loading…
Reference in a new issue