mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 09:56:05 -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
|
@ -38,6 +38,7 @@ from synapse.http.server import HttpServer
|
|||
from synapse.logging.context import current_context, set_current_context
|
||||
from synapse.server import HomeServer
|
||||
from synapse.storage import DataStore
|
||||
from synapse.storage.database import LoggingDatabaseConnection
|
||||
from synapse.storage.engines import PostgresEngine, create_engine
|
||||
from synapse.storage.prepare_database import prepare_database
|
||||
from synapse.util.ratelimitutils import FederationRateLimiter
|
||||
|
@ -88,6 +89,7 @@ def setupdb():
|
|||
host=POSTGRES_HOST,
|
||||
password=POSTGRES_PASSWORD,
|
||||
)
|
||||
db_conn = LoggingDatabaseConnection(db_conn, db_engine, "tests")
|
||||
prepare_database(db_conn, db_engine, None)
|
||||
db_conn.close()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue