mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-04 15:37:49 +00:00
Prefix threadpool with 'module-'
This commit is contained in:
1 parent
8e9405ff41
commit
77a336cfb5
1 file changed
+4
-1
@@ -1766,7 +1766,10 @@ class ModuleApi:
|
||||
The return value of the function once ran in a thread.
|
||||
"""
|
||||
# Report the CPU time of the module's threads under the pool's name.
|
||||
thread_cpu_metrics.register_threadpool(threadpool.name or "module", threadpool)
|
||||
thread_pool_name = "module-other"
|
||||
if threadpool.name:
|
||||
thread_pool_name = "module-" + threadpool.name
|
||||
thread_cpu_metrics.register_threadpool(thread_pool_name, threadpool)
|
||||
|
||||
return await defer_to_threadpool(
|
||||
self._hs.get_reactor(), threadpool, f, *args, **kwargs
|
||||
|
||||
Reference in new issue
Block a user