summary refs log tree commit diff
path: root/synapse/storage/background_updates.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-10-20 17:33:58 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2020-10-20 17:33:58 +0100
commit118f41dba71d866106c51f84bb133707ff7e499b (patch)
treebd1bf12556fe26b89819e950f58fe50206627590 /synapse/storage/background_updates.py
parentMerge commit '4a739c73b' into anoa/dinsic_release_1_21_x (diff)
parentConvert additional database methods to async (select list, search, insert_man... (diff)
downloadsynapse-118f41dba71d866106c51f84bb133707ff7e499b.tar.xz
Merge commit '30426c706' into anoa/dinsic_release_1_21_x
* commit '30426c706':
  Convert additional database methods to async (select list, search, insert_many, delete_*) (#8168)
Diffstat (limited to 'synapse/storage/background_updates.py')
-rw-r--r--synapse/storage/background_updates.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/synapse/storage/background_updates.py b/synapse/storage/background_updates.py

index 56818f4df8..0db900fa0e 100644 --- a/synapse/storage/background_updates.py +++ b/synapse/storage/background_updates.py
@@ -414,13 +414,14 @@ class BackgroundUpdater(object): self.register_background_update_handler(update_name, updater) - def _end_background_update(self, update_name): + async def _end_background_update(self, update_name: str) -> None: """Removes a completed background update task from the queue. Args: - update_name(str): The name of the completed task to remove + update_name:: The name of the completed task to remove + Returns: - A deferred that completes once the task is removed. + None, completes once the task is removed. """ if update_name != self._current_background_update: raise Exception( @@ -428,7 +429,7 @@ class BackgroundUpdater(object): % update_name ) self._current_background_update = None - return self.db_pool.simple_delete_one( + await self.db_pool.simple_delete_one( "background_updates", keyvalues={"update_name": update_name} )