summary refs log tree commit diff
path: root/synapse/app
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/app')
-rw-r--r--synapse/app/_base.py3
-rw-r--r--synapse/app/generic_worker.py8
-rw-r--r--synapse/app/homeserver.py8
3 files changed, 2 insertions, 17 deletions
diff --git a/synapse/app/_base.py b/synapse/app/_base.py
index 5fc59c1be1..807ee3d46e 100644
--- a/synapse/app/_base.py
+++ b/synapse/app/_base.py
@@ -32,7 +32,6 @@ from typing import (
     Iterable,
     List,
     NoReturn,
-    Optional,
     Tuple,
     cast,
 )
@@ -130,7 +129,7 @@ def start_worker_reactor(
 def start_reactor(
     appname: str,
     soft_file_limit: int,
-    gc_thresholds: Optional[Tuple[int, int, int]],
+    gc_thresholds: Tuple[int, int, int],
     pid_file: str,
     daemonize: bool,
     print_pidfile: bool,
diff --git a/synapse/app/generic_worker.py b/synapse/app/generic_worker.py
index e256de2003..502cc8e8d1 100644
--- a/synapse/app/generic_worker.py
+++ b/synapse/app/generic_worker.py
@@ -113,7 +113,6 @@ from synapse.storage.databases.main.monthly_active_users import (
 )
 from synapse.storage.databases.main.presence import PresenceStore
 from synapse.storage.databases.main.room import RoomWorkerStore
-from synapse.storage.databases.main.room_batch import RoomBatchStore
 from synapse.storage.databases.main.search import SearchStore
 from synapse.storage.databases.main.session import SessionStore
 from synapse.storage.databases.main.stats import StatsStore
@@ -241,7 +240,6 @@ class GenericWorkerSlavedStore(
     SlavedEventStore,
     SlavedKeyStore,
     RoomWorkerStore,
-    RoomBatchStore,
     DirectoryStore,
     SlavedApplicationServiceStore,
     SlavedRegistrationStore,
@@ -505,10 +503,6 @@ def start(config_options: List[str]) -> None:
     _base.start_worker_reactor("synapse-generic-worker", config)
 
 
-def main() -> None:
+if __name__ == "__main__":
     with LoggingContext("main"):
         start(sys.argv[1:])
-
-
-if __name__ == "__main__":
-    main()
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py
index dd76e07321..7e09530ad2 100644
--- a/synapse/app/homeserver.py
+++ b/synapse/app/homeserver.py
@@ -194,7 +194,6 @@ class SynapseHomeServer(HomeServer):
                 {
                     "/_matrix/client/api/v1": client_resource,
                     "/_matrix/client/r0": client_resource,
-                    "/_matrix/client/v1": client_resource,
                     "/_matrix/client/v3": client_resource,
                     "/_matrix/client/unstable": client_resource,
                     "/_matrix/client/v2_alpha": client_resource,
@@ -358,13 +357,6 @@ def setup(config_options: List[str]) -> SynapseHomeServer:
         # generating config files and shouldn't try to continue.
         sys.exit(0)
 
-    if config.worker.worker_app:
-        raise ConfigError(
-            "You have specified `worker_app` in the config but are attempting to start a non-worker "
-            "instance. Please use `python -m synapse.app.generic_worker` instead (or remove the option if this is the main process)."
-        )
-        sys.exit(1)
-
     events.USE_FROZEN_DICTS = config.server.use_frozen_dicts
     synapse.util.caches.TRACK_MEMORY_USAGE = config.caches.track_memory_usage