mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-12 08:54:21 -05:00
Don't start user_directory handling on workers
This commit is contained in:
parent
2f34ad31ac
commit
ecdd2a3658
@ -46,6 +46,9 @@ class UserDirectoyHandler(object):
|
|||||||
self.state = hs.get_state_handler()
|
self.state = hs.get_state_handler()
|
||||||
self.server_name = hs.hostname
|
self.server_name = hs.hostname
|
||||||
self.clock = hs.get_clock()
|
self.clock = hs.get_clock()
|
||||||
|
self.notifier = hs.get_notifier()
|
||||||
|
|
||||||
|
self.notifier.add_replication_callback(self.notify_new_event)
|
||||||
|
|
||||||
# When start up for the first time we need to populate the user_directory.
|
# When start up for the first time we need to populate the user_directory.
|
||||||
# This is a set of user_id's we've inserted already
|
# This is a set of user_id's we've inserted already
|
||||||
|
@ -167,7 +167,6 @@ class Notifier(object):
|
|||||||
|
|
||||||
self.clock = hs.get_clock()
|
self.clock = hs.get_clock()
|
||||||
self.appservice_handler = hs.get_application_service_handler()
|
self.appservice_handler = hs.get_application_service_handler()
|
||||||
self.user_directory_handler = hs.get_user_directory_handler()
|
|
||||||
|
|
||||||
if hs.should_send_federation():
|
if hs.should_send_federation():
|
||||||
self.federation_sender = hs.get_federation_sender()
|
self.federation_sender = hs.get_federation_sender()
|
||||||
@ -255,8 +254,6 @@ class Notifier(object):
|
|||||||
room_stream_id
|
room_stream_id
|
||||||
)
|
)
|
||||||
|
|
||||||
preserve_fn(self.user_directory_handler.notify_new_event)()
|
|
||||||
|
|
||||||
if self.federation_sender:
|
if self.federation_sender:
|
||||||
preserve_fn(self.federation_sender.notify_new_events)(
|
preserve_fn(self.federation_sender.notify_new_events)(
|
||||||
room_stream_id
|
room_stream_id
|
||||||
|
Loading…
Reference in New Issue
Block a user