feat: add graceful shutdown

This commit is contained in:
Vyacheslav1557 2024-10-13 21:32:11 +05:00
parent 02c790803a
commit 1d7dd6299c

View file

@ -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)