mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 01:14:48 -04:00
Migrate the user directory initial population to a background task (#4864)
This commit is contained in:
parent
651ad8bc96
commit
282c97327f
8 changed files with 405 additions and 301 deletions
|
@ -16,7 +16,6 @@
|
|||
from twisted.internet import defer
|
||||
|
||||
from synapse.storage import UserDirectoryStore
|
||||
from synapse.storage.roommember import ProfileInfo
|
||||
|
||||
from tests import unittest
|
||||
from tests.utils import setup_test_homeserver
|
||||
|
@ -34,13 +33,9 @@ class UserDirectoryStoreTestCase(unittest.TestCase):
|
|||
|
||||
# alice and bob are both in !room_id. bobby is not but shares
|
||||
# a homeserver with alice.
|
||||
yield self.store.add_profiles_to_user_dir(
|
||||
{
|
||||
ALICE: ProfileInfo(None, "alice"),
|
||||
BOB: ProfileInfo(None, "bob"),
|
||||
BOBBY: ProfileInfo(None, "bobby"),
|
||||
},
|
||||
)
|
||||
yield self.store.update_profile_in_user_dir(ALICE, "alice", None)
|
||||
yield self.store.update_profile_in_user_dir(BOB, "bob", None)
|
||||
yield self.store.update_profile_in_user_dir(BOBBY, "bobby", None)
|
||||
yield self.store.add_users_in_public_rooms(
|
||||
"!room:id", (ALICE, BOB)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue