Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fixup portdb script
Browse files Browse the repository at this point in the history
Being honest I just tried to do the minimal thing possible to get it to
work.
  • Loading branch information
David Robertson committed Nov 16, 2021
1 parent 7f6c2aa commit dfe4779
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/synapse_port_db
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ from synapse.logging.context import (
make_deferred_yieldable,
run_in_background,
)
from synapse.replication.slave.storage.events import SlavedEventStore
from synapse.storage.database import DatabasePool, make_conn
from synapse.storage.databases.main.client_ips import ClientIpBackgroundUpdateStore
from synapse.storage.databases.main.deviceinbox import DeviceInboxBackgroundUpdateStore
Expand All @@ -57,7 +58,6 @@ from synapse.storage.databases.main.room import RoomBackgroundUpdateStore
from synapse.storage.databases.main.roommember import RoomMemberBackgroundUpdateStore
from synapse.storage.databases.main.search import SearchBackgroundUpdateStore
from synapse.storage.databases.main.state import MainStateBackgroundUpdateStore
from synapse.storage.databases.main.stats import StatsStore
from synapse.storage.databases.main.user_directory import (
UserDirectoryBackgroundUpdateStore,
)
Expand Down Expand Up @@ -179,10 +179,10 @@ class Store(
MainStateBackgroundUpdateStore,
UserDirectoryBackgroundUpdateStore,
EndToEndKeyBackgroundStore,
StatsStore,
PusherWorkerStore,
PresenceBackgroundUpdateStore,
GroupServerWorkerStore,
SlavedEventStore,
):
def execute(self, f, *args, **kwargs):
return self.db_pool.runInteraction(f.__name__, f, *args, **kwargs)
Expand Down Expand Up @@ -229,6 +229,10 @@ class MockHomeserver:
def get_instance_name(self):
return "master"

def should_send_federation(self) -> bool:
"Should this server be sending federation traffic directly?"
return False


class Porter(object):
def __init__(self, **kwargs):
Expand Down

0 comments on commit dfe4779

Please sign in to comment.