diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2021-01-26 12:56:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-26 12:56:20 +0000 |
commit | 9f443317bc578e1897c7eab9b4911f952f39fdbc (patch) | |
tree | 1c758596b56fcf9042c688d9f0204d731dbc216e /setup/monolith.go | |
parent | 64fb6de6d4f0860cc2b7503cfc36eb743552395b (diff) |
Graceful shutdowns (#1734)
* Initial graceful stop
* Fix dendritejs
* Use process context for outbound federation requests in destination queues
* Reduce logging
* Fix log level
Diffstat (limited to 'setup/monolith.go')
-rw-r--r-- | setup/monolith.go | 5 |
1 files changed, 3 insertions, 2 deletions
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, ) } |