changelog + lint

This commit is contained in:
H. Shay 2024-11-05 12:20:26 -08:00
parent 9a49bea3af
commit 5ea23469ee
5 changed files with 11 additions and 11 deletions

View file

@ -0,0 +1 @@
Allow Admin API delete room v2 actions to be run on workers.

View file

@ -136,12 +136,11 @@ WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
"worker_extra_conf": "enable_media_repo: true", "worker_extra_conf": "enable_media_repo: true",
}, },
"admin": { "admin": {
"app": "synapse.app.generic_worker", "app": "synapse.app.generic_worker",
"listener_resources": ["replication", "admin"], "listener_resources": ["replication", "admin"],
"endpoint_patterns": ["^/_synapse/admin/v2/rooms/.*$"], "endpoint_patterns": ["^/_synapse/admin/v2/rooms/.*$"],
"shared_extra_conf": {}, "shared_extra_conf": {},
"worker_extra_conf": "", "worker_extra_conf": "",
}, },
"appservice": { "appservice": {
"app": "synapse.app.generic_worker", "app": "synapse.app.generic_worker",
@ -582,7 +581,7 @@ def is_sharding_allowed_for_worker_type(worker_type: str) -> bool:
"receipts", "receipts",
"typing", "typing",
"to_device", "to_device",
"admin" "admin",
] ]

View file

@ -28,12 +28,13 @@ from twisted.web.resource import Resource
import synapse import synapse
import synapse.events import synapse.events
from synapse.api.urls import ( from synapse.api.urls import (
ADMIN_PREFIX,
CLIENT_API_PREFIX, CLIENT_API_PREFIX,
FEDERATION_PREFIX, FEDERATION_PREFIX,
LEGACY_MEDIA_PREFIX, LEGACY_MEDIA_PREFIX,
MEDIA_R0_PREFIX, MEDIA_R0_PREFIX,
MEDIA_V3_PREFIX, MEDIA_V3_PREFIX,
SERVER_KEY_PREFIX, ADMIN_PREFIX, SERVER_KEY_PREFIX,
) )
from synapse.app import _base from synapse.app import _base
from synapse.app._base import ( from synapse.app._base import (
@ -52,7 +53,7 @@ from synapse.logging.context import LoggingContext
from synapse.metrics import METRICS_PREFIX, MetricsResource, RegistryProxy from synapse.metrics import METRICS_PREFIX, MetricsResource, RegistryProxy
from synapse.replication.http import REPLICATION_PREFIX, ReplicationRestResource from synapse.replication.http import REPLICATION_PREFIX, ReplicationRestResource
from synapse.rest import ClientRestResource from synapse.rest import ClientRestResource
from synapse.rest.admin import register_servlets_for_media_repo, AdminRestResource from synapse.rest.admin import AdminRestResource, register_servlets_for_media_repo
from synapse.rest.health import HealthResource from synapse.rest.health import HealthResource
from synapse.rest.key.v2 import KeyResource from synapse.rest.key.v2 import KeyResource
from synapse.rest.synapse.client import build_synapse_client_resource_tree from synapse.rest.synapse.client import build_synapse_client_resource_tree

View file

@ -191,7 +191,7 @@ KNOWN_RESOURCES = {
"openid", "openid",
"replication", "replication",
"static", "static",
"admin" "admin",
} }

View file

@ -2519,7 +2519,6 @@ class RoomStore(RoomBackgroundUpdateStore, RoomWorkerStore):
) )
return next_id return next_id
async def unblock_room(self, room_id: str) -> None: async def unblock_room(self, room_id: str) -> None:
"""Remove the room from blocking list. """Remove the room from blocking list.