diff --git a/README.rst b/README.rst index ae51d6ab39..2691dfc23d 100644 --- a/README.rst +++ b/README.rst @@ -393,4 +393,4 @@ something like the following in their logs:: 2019-09-11 19:32:04,271 - synapse.federation.transport.server - 288 - WARNING - GET-11752 - authenticate_request failed: 401: Invalid signature for server with key ed25519:a_EqML: Unable to verify signature for This is normally caused by a misconfiguration in your reverse-proxy. See -``_ and double-check that your settings are correct. +``_ and double-check that your settings are correct. diff --git a/synapse/storage/engines/sqlite.py b/synapse/storage/engines/sqlite.py index cbc74cd302..df039a072d 100644 --- a/synapse/storage/engines/sqlite.py +++ b/synapse/storage/engines/sqlite.py @@ -16,8 +16,6 @@ import struct import threading -from synapse.storage.prepare_database import prepare_database - class Sqlite3Engine(object): single_threaded = True @@ -62,6 +60,10 @@ class Sqlite3Engine(object): return sql def on_new_connection(self, db_conn): + + # We need to import here to avoid an import loop. + from synapse.storage.prepare_database import prepare_database + if self._is_in_memory: # In memory databases need to be rebuilt each time. Ideally we'd # reuse the same connection as we do when starting up, but that