mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Measure notify_interested_services
This commit is contained in:
parent
949629291c
commit
62c5245c87
@ -17,6 +17,7 @@ from twisted.internet import defer
|
||||
|
||||
from synapse.api.constants import EventTypes
|
||||
from synapse.appservice import ApplicationService
|
||||
from synapse.util.metrics import Measure
|
||||
|
||||
import logging
|
||||
|
||||
@ -42,6 +43,7 @@ class ApplicationServicesHandler(object):
|
||||
self.appservice_api = hs.get_application_service_api()
|
||||
self.scheduler = hs.get_application_service_scheduler()
|
||||
self.started_scheduler = False
|
||||
self.clock = hs.get_clock()
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def notify_interested_services(self, event):
|
||||
@ -53,6 +55,7 @@ class ApplicationServicesHandler(object):
|
||||
Args:
|
||||
event(Event): The event to push out to interested services.
|
||||
"""
|
||||
with Measure(self.clock, "notify_interested_services"):
|
||||
# Gather interested services
|
||||
services = yield self._get_services_for_event(event)
|
||||
if len(services) == 0:
|
||||
|
Loading…
Reference in New Issue
Block a user