mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
More comments
This commit is contained in:
parent
8be1a37909
commit
c48465dbaa
@ -399,6 +399,9 @@ class FederationHandler(BaseHandler):
|
|||||||
if event in events_to_state:
|
if event in events_to_state:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# We store these one at a time since each event depends on the
|
||||||
|
# previous to work out the state.
|
||||||
|
# TODO: We can probably do something more clever here.
|
||||||
yield self._handle_new_event(
|
yield self._handle_new_event(
|
||||||
dest, event
|
dest, event
|
||||||
)
|
)
|
||||||
@ -480,6 +483,7 @@ class FederationHandler(BaseHandler):
|
|||||||
)
|
)
|
||||||
# If this succeeded then we probably already have the
|
# If this succeeded then we probably already have the
|
||||||
# appropriate stuff.
|
# appropriate stuff.
|
||||||
|
# TODO: We can probably do something more intelligent here.
|
||||||
defer.returnValue(True)
|
defer.returnValue(True)
|
||||||
except SynapseError as e:
|
except SynapseError as e:
|
||||||
logger.info(
|
logger.info(
|
||||||
@ -1122,6 +1126,11 @@ class FederationHandler(BaseHandler):
|
|||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def _handle_new_events(self, origin, event_infos, backfilled=False):
|
def _handle_new_events(self, origin, event_infos, backfilled=False):
|
||||||
|
"""Creates the appropriate contexts and persists events. The events
|
||||||
|
should not depend on one another, e.g. this should be used to persist
|
||||||
|
a bunch of outliers, but not a chunk of individual events that depend
|
||||||
|
on each other for state calculations.
|
||||||
|
"""
|
||||||
contexts = yield defer.gatherResults(
|
contexts = yield defer.gatherResults(
|
||||||
[
|
[
|
||||||
self._prep_event(
|
self._prep_event(
|
||||||
|
Loading…
Reference in New Issue
Block a user