mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 15:44:50 -04:00
Add logging on startup/shutdown (#8448)
This is so we can tell what is going on when things are taking a while to start up. The main change here is to ensure that transactions that are created during startup get correctly logged like normal transactions.
This commit is contained in:
parent
ec10bdd32b
commit
e3debf9682
25 changed files with 152 additions and 113 deletions
|
@ -58,7 +58,7 @@ class ApplicationServiceStoreTestCase(unittest.TestCase):
|
|||
# must be done after inserts
|
||||
database = hs.get_datastores().databases[0]
|
||||
self.store = ApplicationServiceStore(
|
||||
database, make_conn(database._database_config, database.engine), hs
|
||||
database, make_conn(database._database_config, database.engine, "test"), hs
|
||||
)
|
||||
|
||||
def tearDown(self):
|
||||
|
@ -132,7 +132,7 @@ class ApplicationServiceTransactionStoreTestCase(unittest.TestCase):
|
|||
|
||||
db_config = hs.config.get_single_database()
|
||||
self.store = TestTransactionStore(
|
||||
database, make_conn(db_config, self.engine), hs
|
||||
database, make_conn(db_config, self.engine, "test"), hs
|
||||
)
|
||||
|
||||
def _add_service(self, url, as_token, id):
|
||||
|
@ -448,7 +448,7 @@ class ApplicationServiceStoreConfigTestCase(unittest.TestCase):
|
|||
|
||||
database = hs.get_datastores().databases[0]
|
||||
ApplicationServiceStore(
|
||||
database, make_conn(database._database_config, database.engine), hs
|
||||
database, make_conn(database._database_config, database.engine, "test"), hs
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
@ -467,7 +467,9 @@ class ApplicationServiceStoreConfigTestCase(unittest.TestCase):
|
|||
with self.assertRaises(ConfigError) as cm:
|
||||
database = hs.get_datastores().databases[0]
|
||||
ApplicationServiceStore(
|
||||
database, make_conn(database._database_config, database.engine), hs
|
||||
database,
|
||||
make_conn(database._database_config, database.engine, "test"),
|
||||
hs,
|
||||
)
|
||||
|
||||
e = cm.exception
|
||||
|
@ -491,7 +493,9 @@ class ApplicationServiceStoreConfigTestCase(unittest.TestCase):
|
|||
with self.assertRaises(ConfigError) as cm:
|
||||
database = hs.get_datastores().databases[0]
|
||||
ApplicationServiceStore(
|
||||
database, make_conn(database._database_config, database.engine), hs
|
||||
database,
|
||||
make_conn(database._database_config, database.engine, "test"),
|
||||
hs,
|
||||
)
|
||||
|
||||
e = cm.exception
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue