summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-05-13 17:15:40 +0100
committerGitHub <noreply@github.com>2020-05-13 17:15:40 +0100
commit1124111a12c3ab35f8b68d9031695aec8b2c7c50 (patch)
tree1ab8125083d6d72ecc747e4f1d2c2d4cae8993cc /synapse/storage
parentFix copypasted comment (#7477) (diff)
downloadsynapse-1124111a12c3ab35f8b68d9031695aec8b2c7c50.tar.xz
Allow censoring of events to happen on workers. (#7492)
This is safe as we can now write to cache invalidation stream on workers, and is required for when we move event persistence off master.
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/data_stores/main/censor_events.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/synapse/storage/data_stores/main/censor_events.py b/synapse/storage/data_stores/main/censor_events.py
index 49683b4d5a..2d48261724 100644
--- a/synapse/storage/data_stores/main/censor_events.py
+++ b/synapse/storage/data_stores/main/censor_events.py
@@ -33,15 +33,10 @@ if TYPE_CHECKING:
 logger = logging.getLogger(__name__)
 
 
-class CensorEventsStore(CacheInvalidationWorkerStore, EventsWorkerStore, SQLBaseStore):
+class CensorEventsStore(EventsWorkerStore, CacheInvalidationWorkerStore, SQLBaseStore):
     def __init__(self, database: Database, db_conn, hs: "HomeServer"):
         super().__init__(database, db_conn, hs)
 
-        # This should only exist on master for now
-        assert (
-            hs.config.worker.worker_app is None
-        ), "Can only instantiate CensorEventsStore on master"
-
         def _censor_redactions():
             return run_as_background_process(
                 "_censor_redactions", self._censor_redactions