mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-27 08:30:24 -05:00
Reinstate event_search_postgres_gist handler
People may have queued updates for this, so we can't just delete it.
This commit is contained in:
parent
a66f489678
commit
6b02fc80d1
3 changed files with 31 additions and 6 deletions
|
|
@ -242,6 +242,25 @@ class BackgroundUpdateStore(SQLBaseStore):
|
|||
"""
|
||||
self._background_update_handlers[update_name] = update_handler
|
||||
|
||||
def register_noop_background_update(self, update_name):
|
||||
"""Register a noop handler for a background update.
|
||||
|
||||
This is useful when we previously did a background update, but no
|
||||
longer wish to do the update. In this case the background update should
|
||||
be removed from the schema delta files, but there may still be some
|
||||
users who have the background update queued, so this method should
|
||||
also be called to clear the update.
|
||||
|
||||
Args:
|
||||
update_name (str): Name of update
|
||||
"""
|
||||
@defer.inlineCallbacks
|
||||
def noop_update(progress, batch_size):
|
||||
yield self._end_background_update(update_name)
|
||||
defer.returnValue(1)
|
||||
|
||||
self.register_background_update_handler(update_name, noop_update)
|
||||
|
||||
def register_background_index_update(self, update_name, index_name,
|
||||
table, columns, where_clause=None,
|
||||
unique=False,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue