Add extra Measure
This commit is contained in:
parent
a2546b9082
commit
7be1065b8f
|
@ -114,20 +114,22 @@ class HttpPusher(object):
|
||||||
def _process(self):
|
def _process(self):
|
||||||
if self.processing:
|
if self.processing:
|
||||||
return
|
return
|
||||||
try:
|
|
||||||
self.processing = True
|
with Measure(self.clock, "push._process"):
|
||||||
# if the max ordering changes while we're running _unsafe_process,
|
try:
|
||||||
# call it again, and so on until we've caught up.
|
self.processing = True
|
||||||
while True:
|
# if the max ordering changes while we're running _unsafe_process,
|
||||||
starting_max_ordering = self.max_stream_ordering
|
# call it again, and so on until we've caught up.
|
||||||
try:
|
while True:
|
||||||
yield self._unsafe_process()
|
starting_max_ordering = self.max_stream_ordering
|
||||||
except:
|
try:
|
||||||
logger.exception("Exception processing notifs")
|
yield self._unsafe_process()
|
||||||
if self.max_stream_ordering == starting_max_ordering:
|
except:
|
||||||
break
|
logger.exception("Exception processing notifs")
|
||||||
finally:
|
if self.max_stream_ordering == starting_max_ordering:
|
||||||
self.processing = False
|
break
|
||||||
|
finally:
|
||||||
|
self.processing = False
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def _unsafe_process(self):
|
def _unsafe_process(self):
|
||||||
|
|
Loading…
Reference in New Issue