diff options
author | Erik Johnston <erikj@jki.re> | 2019-03-14 13:54:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-14 13:54:15 +0000 |
commit | 9073cfc8bda9b2c37b0ac8b428db39b3580cd18a (patch) | |
tree | ecedb9b87e11e269b2fdf009ecdcd7c3985a2e80 /synapse/server.py | |
parent | Document using a certificate with a full chain (#4849) (diff) | |
parent | fixup (diff) | |
download | synapse-9073cfc8bda9b2c37b0ac8b428db39b3580cd18a.tar.xz |
Merge pull request #4846 from matrix-org/hawkowl/userdir-search
Improve searching in the userdir
Diffstat (limited to 'synapse/server.py')
-rw-r--r-- | synapse/server.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/synapse/server.py b/synapse/server.py index 72835e8c86..b9549dd042 100644 --- a/synapse/server.py +++ b/synapse/server.py @@ -185,6 +185,10 @@ class HomeServer(object): 'registration_handler', ] + REQUIRED_ON_MASTER_STARTUP = [ + "user_directory_handler", + ] + # This is overridden in derived application classes # (such as synapse.app.homeserver.SynapseHomeServer) and gives the class to be # instantiated during setup() for future return by get_datastore() @@ -221,6 +225,15 @@ class HomeServer(object): conn.commit() logger.info("Finished setting up.") + def setup_master(self): + """ + Some handlers have side effects on instantiation (like registering + background updates). This function causes them to be fetched, and + therefore instantiated, to run those side effects. + """ + for i in self.REQUIRED_ON_MASTER_STARTUP: + getattr(self, "get_" + i)() + def get_reactor(self): """ Fetch the Twisted reactor in use by this HomeServer. |