diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-12-04 18:20:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-04 18:20:36 +0000 |
commit | fe799f353dbd1f018fac39d2737f62688edb101d (patch) | |
tree | 9054f3c4ee26d2bdc56ed49f5972a23c0c86e92a /synapse | |
parent | get rid of (most of) have_events from _update_auth_events_and_context_for_aut... (diff) | |
parent | Fix background updates for synapse_port_db (diff) | |
download | synapse-fe799f353dbd1f018fac39d2737f62688edb101d.tar.xz |
Merge pull request #6470 from matrix-org/babolivier/port_db_ci_failure
Make synapse_port_db exit with a non-0 code if something failed
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/storage/data_stores/main/room.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/synapse/storage/data_stores/main/room.py b/synapse/storage/data_stores/main/room.py index b7f9024811..dd1f42c23a 100644 --- a/synapse/storage/data_stores/main/room.py +++ b/synapse/storage/data_stores/main/room.py @@ -28,6 +28,7 @@ from twisted.internet import defer from synapse.api.constants import EventTypes from synapse.api.errors import StoreError from synapse.storage._base import SQLBaseStore +from synapse.storage.background_updates import BackgroundUpdateStore from synapse.storage.data_stores.main.search import SearchStore from synapse.types import ThirdPartyInstanceID from synapse.util.caches.descriptors import cached, cachedInlineCallbacks @@ -360,9 +361,9 @@ class RoomWorkerStore(SQLBaseStore): defer.returnValue(row) -class RoomStore(RoomWorkerStore, SearchStore): +class RoomBackgroundUpdateStore(BackgroundUpdateStore): def __init__(self, db_conn, hs): - super(RoomStore, self).__init__(db_conn, hs) + super(RoomBackgroundUpdateStore, self).__init__(db_conn, hs) self.config = hs.config @@ -438,6 +439,13 @@ class RoomStore(RoomWorkerStore, SearchStore): defer.returnValue(batch_size) + +class RoomStore(RoomBackgroundUpdateStore, RoomWorkerStore, SearchStore): + def __init__(self, db_conn, hs): + super(RoomStore, self).__init__(db_conn, hs) + + self.config = hs.config + @defer.inlineCallbacks def store_room(self, room_id, room_creator_user_id, is_public): """Stores a room. |