Skip to content

Commit fae75b0

Browse files
Register the media threadpool with our metrics (#17566)
1 parent f77bfbf commit fae75b0

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

changelog.d/17566.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Speed up responding to media requests.

synapse/server.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@
124124
)
125125
from synapse.http.matrixfederationclient import MatrixFederationHttpClient
126126
from synapse.media.media_repository import MediaRepository
127+
from synapse.metrics import register_threadpool
127128
from synapse.metrics.common_usage_metrics import CommonUsageMetricsManager
128129
from synapse.module_api import ModuleApi
129130
from synapse.module_api.callbacks import ModuleApiCallbacks
@@ -959,4 +960,7 @@ def get_media_sender_thread_pool(self) -> ThreadPool:
959960
"during", "shutdown", media_threadpool.stop
960961
)
961962

963+
# Register the threadpool with our metrics.
964+
register_threadpool("media", media_threadpool)
965+
962966
return media_threadpool

0 commit comments

Comments
 (0)