fix(s3): handle storage outages and check bucket readiness
This commit is contained in:
@@ -115,6 +115,7 @@ func Run() error {
|
||||
cfg.Server.MaxInflightRequests,
|
||||
cfg.S3.MaxUploadBytes,
|
||||
pool,
|
||||
s3Client,
|
||||
authService,
|
||||
userService,
|
||||
chatService,
|
||||
|
||||
@@ -18,6 +18,7 @@ func NewRouter(
|
||||
maxInflightRequests int,
|
||||
maxUploadBytes int,
|
||||
db handler.Pinger,
|
||||
storage handler.Pinger,
|
||||
authService *service.AuthService,
|
||||
userService *service.UserService,
|
||||
chatService *service.ChatService,
|
||||
@@ -26,7 +27,7 @@ func NewRouter(
|
||||
) http.Handler {
|
||||
router := chi.NewRouter()
|
||||
|
||||
healthHandler := handler.NewHealthHandler(log, db)
|
||||
healthHandler := handler.NewHealthHandler(log, db, storage)
|
||||
authHandler := handler.NewAuthHandler(authService)
|
||||
userHandler := handler.NewUserHandler(userService)
|
||||
chatHandler := handler.NewChatHandler(chatService)
|
||||
|
||||
Reference in New Issue
Block a user