From 9f443317bc578e1897c7eab9b4911f952f39fdbc Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 26 Jan 2021 12:56:20 +0000 Subject: Graceful shutdowns (#1734) * Initial graceful stop * Fix dendritejs * Use process context for outbound federation requests in destination queues * Reduce logging * Fix log level --- setup/monolith.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'setup/monolith.go') diff --git a/setup/monolith.go b/setup/monolith.go index fd84ef53..a740ebb7 100644 --- a/setup/monolith.go +++ b/setup/monolith.go @@ -27,6 +27,7 @@ import ( "github.com/matrix-org/dendrite/mediaapi" roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/setup/config" + "github.com/matrix-org/dendrite/setup/process" serverKeyAPI "github.com/matrix-org/dendrite/signingkeyserver/api" "github.com/matrix-org/dendrite/syncapi" userapi "github.com/matrix-org/dendrite/userapi/api" @@ -56,7 +57,7 @@ type Monolith struct { } // AddAllPublicRoutes attaches all public paths to the given router -func (m *Monolith) AddAllPublicRoutes(csMux, ssMux, keyMux, mediaMux *mux.Router) { +func (m *Monolith) AddAllPublicRoutes(process *process.ProcessContext, csMux, ssMux, keyMux, mediaMux *mux.Router) { clientapi.AddPublicRoutes( csMux, &m.Config.ClientAPI, m.AccountDB, m.FedClient, m.RoomserverAPI, @@ -71,7 +72,7 @@ func (m *Monolith) AddAllPublicRoutes(csMux, ssMux, keyMux, mediaMux *mux.Router ) mediaapi.AddPublicRoutes(mediaMux, &m.Config.MediaAPI, m.UserAPI, m.Client) syncapi.AddPublicRoutes( - csMux, m.UserAPI, m.RoomserverAPI, + process, csMux, m.UserAPI, m.RoomserverAPI, m.KeyAPI, m.FedClient, &m.Config.SyncAPI, ) } -- cgit v1.2.3