Merge pull request #2893 from matrix-org/erikj/delete_from_staging_fed

Delete from push_actions_staging in federation too
This commit is contained in:
Erik Johnston 2018-02-21 11:00:06 +00:00 committed by GitHub
commit 27939cbb0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1447,6 +1447,7 @@ class FederationHandler(BaseHandler):
auth_events=auth_events,
)
try:
if not event.internal_metadata.is_outlier() and not backfilled:
yield self.action_generator.handle_push_actions_for_event(
event, context
@ -1457,6 +1458,13 @@ class FederationHandler(BaseHandler):
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