Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add missing consumeErrors to improve exception handling #3139

Merged
merged 1 commit into from
Apr 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions synapse/handlers/e2e_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def do_remote_query(destination):
yield make_deferred_yieldable(defer.gatherResults([
preserve_fn(do_remote_query)(destination)
for destination in remote_queries_not_in_cache
]))
], consumeErrors=True))

defer.returnValue({
"device_keys": results, "failures": failures,
Expand Down Expand Up @@ -244,7 +244,7 @@ def claim_client_keys(destination):
yield make_deferred_yieldable(defer.gatherResults([
preserve_fn(claim_client_keys)(destination)
for destination in remote_queries
]))
], consumeErrors=True))

logger.info(
"Claimed one-time-keys: %s",
Expand Down
8 changes: 6 additions & 2 deletions synapse/push/pusherpool.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ def on_new_notifications(self, min_stream_id, max_stream_id):
)
)

yield make_deferred_yieldable(defer.gatherResults(deferreds))
yield make_deferred_yieldable(
defer.gatherResults(deferreds, consumeErrors=True),
)
except Exception:
logger.exception("Exception in pusher on_new_notifications")

Expand All @@ -167,7 +169,9 @@ def on_new_receipts(self, min_stream_id, max_stream_id, affected_room_ids):
preserve_fn(p.on_new_receipts)(min_stream_id, max_stream_id)
)

yield make_deferred_yieldable(defer.gatherResults(deferreds))
yield make_deferred_yieldable(
defer.gatherResults(deferreds, consumeErrors=True),
)
except Exception:
logger.exception("Exception in pusher on_new_receipts")

Expand Down
2 changes: 1 addition & 1 deletion synapse/storage/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def get_room_events_stream_for_rooms(self, room_ids, from_key, to_key, limit=0,
room_id, from_key, to_key, limit, order=order,
)
for room_id in rm_ids
]))
], consumeErrors=True))
results.update(dict(zip(rm_ids, res)))

defer.returnValue(results)
Expand Down