mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-08 04:14:57 -04:00
Make background updates controllable via a plugin (#11306)
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
This commit is contained in:
parent
9d1971a5c4
commit
d08ef6f155
12 changed files with 407 additions and 61 deletions
|
@ -128,6 +128,7 @@ class EmailPusherTests(HomeserverTestCase):
|
|||
)
|
||||
|
||||
self.auth_handler = hs.get_auth_handler()
|
||||
self.store = hs.get_datastore()
|
||||
|
||||
def test_need_validated_email(self):
|
||||
"""Test that we can only add an email pusher if the user has validated
|
||||
|
@ -408,13 +409,7 @@ class EmailPusherTests(HomeserverTestCase):
|
|||
self.hs.get_datastore().db_pool.updates._all_done = False
|
||||
|
||||
# Now let's actually drive the updates to completion
|
||||
while not self.get_success(
|
||||
self.hs.get_datastore().db_pool.updates.has_completed_background_updates()
|
||||
):
|
||||
self.get_success(
|
||||
self.hs.get_datastore().db_pool.updates.do_next_background_update(100),
|
||||
by=0.1,
|
||||
)
|
||||
self.wait_for_background_updates()
|
||||
|
||||
# Check that all pushers with unlinked addresses were deleted
|
||||
pushers = self.get_success(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue