summary refs log tree commit diff
path: root/synapse/app/homeserver.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/app/homeserver.py')
-rwxr-xr-xsynapse/app/homeserver.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py
index e6377e3060..2f1b954902 100755
--- a/synapse/app/homeserver.py
+++ b/synapse/app/homeserver.py
@@ -39,6 +39,7 @@ import logging
 import os
 import re
 import sys
+import sqlite3
 
 logger = logging.getLogger(__name__)
 
@@ -208,7 +209,14 @@ def setup():
         redirect_root_to_web_client=True,
     )
 
-    prepare_database(hs.get_db_name())
+    db_name = hs.get_db_name()
+
+    logging.info("Preparing database: %s...", db_name)
+
+    with sqlite3.connect(db_name) as db_conn:
+        prepare_database(db_conn)
+
+    logging.info("Database prepared in %s.", db_name)
 
     hs.get_db_pool()