Use consumeErrors=True on all DeferredLists.
This is so that the DeferredLists actually consume the error instead of propogating down the non-existent errback chain. This should reduce the number of unhandled errors we are seeing.
This commit is contained in:
parent
0421eb84ac
commit
72a4de2ce6
|
@ -124,7 +124,7 @@ class FederationServer(FederationBase):
|
||||||
edu.content
|
edu.content
|
||||||
)
|
)
|
||||||
|
|
||||||
results = yield defer.DeferredList(dl)
|
results = yield defer.DeferredList(dl, consumeErrors=True)
|
||||||
|
|
||||||
ret = []
|
ret = []
|
||||||
for r in results:
|
for r in results:
|
||||||
|
|
|
@ -98,7 +98,7 @@ class TransactionQueue(object):
|
||||||
|
|
||||||
deferreds.append(deferred)
|
deferreds.append(deferred)
|
||||||
|
|
||||||
yield defer.DeferredList(deferreds)
|
yield defer.DeferredList(deferreds, consumeErrors=True)
|
||||||
|
|
||||||
# NO inlineCallbacks
|
# NO inlineCallbacks
|
||||||
def enqueue_edu(self, edu):
|
def enqueue_edu(self, edu):
|
||||||
|
|
|
@ -492,7 +492,7 @@ class PresenceHandler(BaseHandler):
|
||||||
user, domain, remoteusers
|
user, domain, remoteusers
|
||||||
))
|
))
|
||||||
|
|
||||||
yield defer.DeferredList(deferreds)
|
yield defer.DeferredList(deferreds, consumeErrors=True)
|
||||||
|
|
||||||
def _start_polling_local(self, user, target_user):
|
def _start_polling_local(self, user, target_user):
|
||||||
target_localpart = target_user.localpart
|
target_localpart = target_user.localpart
|
||||||
|
@ -548,7 +548,7 @@ class PresenceHandler(BaseHandler):
|
||||||
self._stop_polling_remote(user, domain, remoteusers)
|
self._stop_polling_remote(user, domain, remoteusers)
|
||||||
)
|
)
|
||||||
|
|
||||||
return defer.DeferredList(deferreds)
|
return defer.DeferredList(deferreds, consumeErrors=True)
|
||||||
|
|
||||||
def _stop_polling_local(self, user, target_user):
|
def _stop_polling_local(self, user, target_user):
|
||||||
for localpart in self._local_pushmap.keys():
|
for localpart in self._local_pushmap.keys():
|
||||||
|
@ -729,7 +729,7 @@ class PresenceHandler(BaseHandler):
|
||||||
del self._remote_sendmap[user]
|
del self._remote_sendmap[user]
|
||||||
|
|
||||||
with PreserveLoggingContext():
|
with PreserveLoggingContext():
|
||||||
yield defer.DeferredList(deferreds)
|
yield defer.DeferredList(deferreds, consumeErrors=True)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def push_update_to_local_and_remote(self, observed_user, statuscache,
|
def push_update_to_local_and_remote(self, observed_user, statuscache,
|
||||||
|
@ -768,7 +768,7 @@ class PresenceHandler(BaseHandler):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
yield defer.DeferredList(deferreds)
|
yield defer.DeferredList(deferreds, consumeErrors=True)
|
||||||
|
|
||||||
defer.returnValue((localusers, remote_domains))
|
defer.returnValue((localusers, remote_domains))
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,8 @@ class Notifier(object):
|
||||||
|
|
||||||
with PreserveLoggingContext():
|
with PreserveLoggingContext():
|
||||||
yield defer.DeferredList(
|
yield defer.DeferredList(
|
||||||
[notify(l).addErrback(eb) for l in listeners]
|
[notify(l).addErrback(eb) for l in listeners],
|
||||||
|
consumeErrors=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
@ -203,7 +204,8 @@ class Notifier(object):
|
||||||
|
|
||||||
with PreserveLoggingContext():
|
with PreserveLoggingContext():
|
||||||
yield defer.DeferredList(
|
yield defer.DeferredList(
|
||||||
[notify(l).addErrback(eb) for l in listeners]
|
[notify(l).addErrback(eb) for l in listeners],
|
||||||
|
consumeErrors=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
|
|
@ -288,7 +288,7 @@ class RoomMemberStore(SQLBaseStore):
|
||||||
|
|
||||||
deferreds = [self.get_rooms_for_user(u) for u in user_id_list]
|
deferreds = [self.get_rooms_for_user(u) for u in user_id_list]
|
||||||
|
|
||||||
results = yield defer.DeferredList(deferreds)
|
results = yield defer.DeferredList(deferreds, consumeErrors=True)
|
||||||
|
|
||||||
# A list of sets of strings giving room IDs for each user
|
# A list of sets of strings giving room IDs for each user
|
||||||
room_id_lists = [set([r.room_id for r in result[1]]) for result in results]
|
room_id_lists = [set([r.room_id for r in result[1]]) for result in results]
|
||||||
|
|
Loading…
Reference in New Issue