diff options
author | Erik Johnston <erik@matrix.org> | 2019-12-04 15:09:36 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-12-05 11:11:26 +0000 |
commit | 4a33a6dd19590b8e6626a5af5a69507dc11236f8 (patch) | |
tree | 4d4f1f826a93afbd47e50562949a0e2f51ddb827 /synapse/storage/database.py | |
parent | Comments (diff) | |
download | synapse-4a33a6dd19590b8e6626a5af5a69507dc11236f8.tar.xz |
Move background update handling out of store
Diffstat (limited to 'synapse/storage/database.py')
-rw-r--r-- | synapse/storage/database.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/database.py b/synapse/storage/database.py index ac64d80806..be36c1b829 100644 --- a/synapse/storage/database.py +++ b/synapse/storage/database.py @@ -30,6 +30,7 @@ from twisted.internet import defer from synapse.api.errors import StoreError from synapse.logging.context import LoggingContext, make_deferred_yieldable from synapse.metrics.background_process_metrics import run_as_background_process +from synapse.storage.background_updates import BackgroundUpdater from synapse.storage.engines import PostgresEngine, Sqlite3Engine from synapse.util.stringutils import exception_to_unicode @@ -223,6 +224,8 @@ class Database(object): self._clock = hs.get_clock() self._db_pool = hs.get_db_pool() + self.updates = BackgroundUpdater(hs, self) + self._previous_txn_total_time = 0 self._current_txn_total_time = 0 self._previous_loop_ts = 0 |