forked from MirrorHub/synapse
Measure notify_interested_services
This commit is contained in:
parent
949629291c
commit
62c5245c87
1 changed files with 19 additions and 16 deletions
|
@ -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 a new issue