mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 18:14:49 -04:00
Add a background update to clear tombstoned rooms from the directory (#6648)
* Add a background update to clear tombstoned rooms from the directory * use the ABC metaclass
This commit is contained in:
parent
9824a39d80
commit
85db7f73be
6 changed files with 106 additions and 1 deletions
|
@ -436,6 +436,21 @@ class BackgroundUpdater(object):
|
|||
"background_updates", keyvalues={"update_name": update_name}
|
||||
)
|
||||
|
||||
def _background_update_progress(self, update_name: str, progress: dict):
|
||||
"""Update the progress of a background update
|
||||
|
||||
Args:
|
||||
update_name: The name of the background update task
|
||||
progress: The progress of the update.
|
||||
"""
|
||||
|
||||
return self.db.runInteraction(
|
||||
"background_update_progress",
|
||||
self._background_update_progress_txn,
|
||||
update_name,
|
||||
progress,
|
||||
)
|
||||
|
||||
def _background_update_progress_txn(self, txn, update_name, progress):
|
||||
"""Update the progress of a background update
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue