mirror of
https://github.com/element-hq/synapse
synced 2024-09-04 04:20:06 +00:00
Merge together redundant calculations/logging
This commit is contained in:
parent
2347efc065
commit
ef862186dd
1 changed files with 2 additions and 9 deletions
|
@ -175,14 +175,9 @@ class FederationHandler(BaseHandler):
|
||||||
# Update the set of things we've seen after trying to
|
# Update the set of things we've seen after trying to
|
||||||
# fetch the missing stuff
|
# fetch the missing stuff
|
||||||
have_seen = yield self.store.have_events(prevs)
|
have_seen = yield self.store.have_events(prevs)
|
||||||
|
|
||||||
seen = set(have_seen.iterkeys())
|
seen = set(have_seen.iterkeys())
|
||||||
if prevs - seen:
|
|
||||||
logger.info(
|
if not prevs - seen:
|
||||||
"Still missing %d prev events for %s: %r...",
|
|
||||||
len(prevs - seen), pdu.event_id, list(prevs - seen)[:5]
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
logger.info(
|
logger.info(
|
||||||
"Found all missing prev events for %s", pdu.event_id
|
"Found all missing prev events for %s", pdu.event_id
|
||||||
)
|
)
|
||||||
|
@ -193,8 +188,6 @@ class FederationHandler(BaseHandler):
|
||||||
list(prevs - seen)[:5],
|
list(prevs - seen)[:5],
|
||||||
)
|
)
|
||||||
|
|
||||||
prevs = {e_id for e_id, _ in pdu.prev_events}
|
|
||||||
seen = set(have_seen.keys())
|
|
||||||
if prevs - seen:
|
if prevs - seen:
|
||||||
logger.info(
|
logger.info(
|
||||||
"Still missing %d events for room %r: %r...",
|
"Still missing %d events for room %r: %r...",
|
||||||
|
|
Loading…
Reference in a new issue