Skip to content

Commit

Permalink
Register the media threadpool with our metrics (#17566)
Browse files Browse the repository at this point in the history
  • Loading branch information
anoadragon453 authored Aug 14, 2024
1 parent f77bfbf commit fae75b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/17566.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Speed up responding to media requests.
4 changes: 4 additions & 0 deletions synapse/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
)
from synapse.http.matrixfederationclient import MatrixFederationHttpClient
from synapse.media.media_repository import MediaRepository
from synapse.metrics import register_threadpool
from synapse.metrics.common_usage_metrics import CommonUsageMetricsManager
from synapse.module_api import ModuleApi
from synapse.module_api.callbacks import ModuleApiCallbacks
Expand Down Expand Up @@ -959,4 +960,7 @@ def get_media_sender_thread_pool(self) -> ThreadPool:
"during", "shutdown", media_threadpool.stop
)

# Register the threadpool with our metrics.
register_threadpool("media", media_threadpool)

return media_threadpool

0 comments on commit fae75b0

Please sign in to comment.