mirror of
https://github.com/element-hq/synapse.git
synced 2025-03-09 09:26:50 +00:00
Move Measure block inside loop
This commit is contained in:
parent
973d67a033
commit
b9e888858c
1 changed files with 9 additions and 9 deletions
|
@ -113,7 +113,6 @@ class _ServiceQueuer(object):
|
||||||
if service.id in self.requests_in_flight:
|
if service.id in self.requests_in_flight:
|
||||||
return
|
return
|
||||||
|
|
||||||
with Measure(self.clock, "_ServiceQueuer._send_request"):
|
|
||||||
self.requests_in_flight.add(service.id)
|
self.requests_in_flight.add(service.id)
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
|
@ -121,6 +120,7 @@ class _ServiceQueuer(object):
|
||||||
if not events:
|
if not events:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
with Measure(self.clock, "_ServiceQueuer._send_request"):
|
||||||
try:
|
try:
|
||||||
yield self.txn_ctrl.send(service, events)
|
yield self.txn_ctrl.send(service, events)
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Add table
Reference in a new issue