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

Commit

Permalink
Delete from push_actions_staging in federation too
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Feb 20, 2018
1 parent 3fc33ba commit d874d4f
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions synapse/handlers/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1447,16 +1447,24 @@ def _handle_new_event(self, origin, event, state=None, auth_events=None,
auth_events=auth_events,
)

if not event.internal_metadata.is_outlier() and not backfilled:
yield self.action_generator.handle_push_actions_for_event(
event, context
)
try:
if not event.internal_metadata.is_outlier() and not backfilled:
yield self.action_generator.handle_push_actions_for_event(
event, context
)

event_stream_id, max_stream_id = yield self.store.persist_event(
event,
context=context,
backfilled=backfilled,
)
event_stream_id, max_stream_id = yield self.store.persist_event(
event,
context=context,
backfilled=backfilled,
)
except: # noqa: E722, as we reraise the exception this is fine.
# Ensure that we actually remove the entries in the push actions
# staging area
logcontext.preserve_fn(
self.store.remove_push_actions_from_staging
)(event.event_id)
raise

if not backfilled:
# this intentionally does not yield: we don't care about the result
Expand Down

0 comments on commit d874d4f

Please sign in to comment.