mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 03:34:49 -04:00
Remove HomeServer.get_datastore()
(#12031)
The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733
This commit is contained in:
parent
c1ac2a8135
commit
e24ff8ebe3
230 changed files with 526 additions and 500 deletions
|
@ -76,7 +76,7 @@ class PerDestinationQueue:
|
|||
):
|
||||
self._server_name = hs.hostname
|
||||
self._clock = hs.get_clock()
|
||||
self._store = hs.get_datastore()
|
||||
self._store = hs.get_datastores().main
|
||||
self._transaction_manager = transaction_manager
|
||||
self._instance_name = hs.get_instance_name()
|
||||
self._federation_shard_config = hs.config.worker.federation_shard_config
|
||||
|
@ -381,9 +381,8 @@ class PerDestinationQueue:
|
|||
)
|
||||
)
|
||||
|
||||
last_successful_stream_ordering = self._last_successful_stream_ordering
|
||||
|
||||
if last_successful_stream_ordering is None:
|
||||
_tmp_last_successful_stream_ordering = self._last_successful_stream_ordering
|
||||
if _tmp_last_successful_stream_ordering is None:
|
||||
# if it's still None, then this means we don't have the information
|
||||
# in our database we haven't successfully sent a PDU to this server
|
||||
# (at least since the introduction of the feature tracking
|
||||
|
@ -393,6 +392,8 @@ class PerDestinationQueue:
|
|||
self._catching_up = False
|
||||
return
|
||||
|
||||
last_successful_stream_ordering: int = _tmp_last_successful_stream_ordering
|
||||
|
||||
# get at most 50 catchup room/PDUs
|
||||
while True:
|
||||
event_ids = await self._store.get_catch_up_room_event_ids(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue