mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-13 06:02:18 -04:00
Replace noop background updates with DELETE. (#12954)
Removes the `register_noop_background_update` and deletes the background updates directly in a delta file.
This commit is contained in:
parent
f68b5e5773
commit
53b77b203a
14 changed files with 62 additions and 146 deletions
|
@ -834,8 +834,6 @@ class DeviceInboxWorkerStore(SQLBaseStore):
|
|||
|
||||
class DeviceInboxBackgroundUpdateStore(SQLBaseStore):
|
||||
DEVICE_INBOX_STREAM_ID = "device_inbox_stream_drop"
|
||||
REMOVE_DELETED_DEVICES = "remove_deleted_devices_from_device_inbox"
|
||||
REMOVE_HIDDEN_DEVICES = "remove_hidden_devices_from_device_inbox"
|
||||
REMOVE_DEAD_DEVICES_FROM_INBOX = "remove_dead_devices_from_device_inbox"
|
||||
|
||||
def __init__(
|
||||
|
@ -857,15 +855,6 @@ class DeviceInboxBackgroundUpdateStore(SQLBaseStore):
|
|||
self.DEVICE_INBOX_STREAM_ID, self._background_drop_index_device_inbox
|
||||
)
|
||||
|
||||
# Used to be a background update that deletes all device_inboxes for deleted
|
||||
# devices.
|
||||
self.db_pool.updates.register_noop_background_update(
|
||||
self.REMOVE_DELETED_DEVICES
|
||||
)
|
||||
# Used to be a background update that deletes all device_inboxes for hidden
|
||||
# devices.
|
||||
self.db_pool.updates.register_noop_background_update(self.REMOVE_HIDDEN_DEVICES)
|
||||
|
||||
self.db_pool.updates.register_background_update_handler(
|
||||
self.REMOVE_DEAD_DEVICES_FROM_INBOX,
|
||||
self._remove_dead_devices_from_device_inbox,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue