How could we ever forget you, ./scripts-dev/lint.sh?
This commit is contained in:
@@ -504,9 +504,7 @@ class PerDestinationQueue(object):
|
||||
# of redacted events to the destination.
|
||||
# - don't need to worry about rejected events as we do not actively
|
||||
# forward received events over federation.
|
||||
events = await self._store.get_events_as_list(
|
||||
event_ids
|
||||
)
|
||||
events = await self._store.get_events_as_list(event_ids)
|
||||
|
||||
# zip them together with their stream orderings
|
||||
catch_up_pdus = [
|
||||
|
||||
@@ -14,14 +14,13 @@
|
||||
# limitations under the License.
|
||||
import logging
|
||||
from collections import namedtuple
|
||||
from typing import List, Optional, Iterable
|
||||
from typing import Iterable, List, Optional
|
||||
|
||||
from canonicaljson import encode_canonical_json
|
||||
|
||||
from synapse.metrics.background_process_metrics import run_as_background_process
|
||||
from synapse.storage._base import SQLBaseStore, db_to_json
|
||||
from synapse.storage.database import DatabasePool
|
||||
from synapse.types import Collection
|
||||
from synapse.util.caches.expiringcache import ExpiringCache
|
||||
|
||||
db_binary_type = memoryview
|
||||
@@ -266,7 +265,9 @@ class TransactionStore(SQLBaseStore):
|
||||
"_cleanup_transactions", _cleanup_transactions_txn
|
||||
)
|
||||
|
||||
async def get_last_successful_stream_ordering(self, destination: str) -> Optional[int]:
|
||||
async def get_last_successful_stream_ordering(
|
||||
self, destination: str
|
||||
) -> Optional[int]:
|
||||
"""
|
||||
Gets the stream ordering of the PDU most-recently successfully sent
|
||||
to the specified destination.
|
||||
@@ -350,7 +351,9 @@ class TransactionStore(SQLBaseStore):
|
||||
event_ids = [row[0] for row in txn]
|
||||
return event_ids
|
||||
|
||||
async def get_largest_destination_rooms_stream_order(self, destination: str) -> Optional[int]:
|
||||
async def get_largest_destination_rooms_stream_order(
|
||||
self, destination: str
|
||||
) -> Optional[int]:
|
||||
"""
|
||||
Returns the largest stream_ordering from the destination_rooms table
|
||||
that corresponds to this destination.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from asyncio.futures import Future
|
||||
from typing import List, Tuple
|
||||
|
||||
from mock import Mock
|
||||
@@ -32,7 +31,9 @@ class FederationCatchUpTestCases(FederatingHomeserverTestCase):
|
||||
state_handler = hs.get_state_handler()
|
||||
|
||||
# This mock is crucial for destination_rooms to be populated.
|
||||
state_handler.get_current_hosts_in_room = Mock(return_value=make_awaitable(["test", "host2"]))
|
||||
state_handler.get_current_hosts_in_room = Mock(
|
||||
return_value=make_awaitable(["test", "host2"])
|
||||
)
|
||||
|
||||
# whenever send_transaction is called, record the pdu data
|
||||
self.pdus = []
|
||||
|
||||
Reference in New Issue
Block a user