Correctly loop over events_and_contexts
This commit is contained in:
parent
13dbcafb9b
commit
6c1d13a15a
|
@ -1115,6 +1115,7 @@ class EventsStore(EventsWorkerStore):
|
|||
],
|
||||
)
|
||||
|
||||
for event, _ in events_and_contexts:
|
||||
if event.internal_metadata.is_outlier():
|
||||
chunk_id, _topo = None, 0
|
||||
else:
|
||||
|
@ -1123,11 +1124,10 @@ class EventsStore(EventsWorkerStore):
|
|||
[eid for eid, _ in event.prev_events],
|
||||
)
|
||||
|
||||
self._simple_insert_many_txn(
|
||||
self._simple_insert_txn(
|
||||
txn,
|
||||
table="events",
|
||||
values=[
|
||||
{
|
||||
values={
|
||||
"stream_ordering": event.internal_metadata.stream_ordering,
|
||||
"chunk_id": chunk_id,
|
||||
"topological_ordering": event.depth,
|
||||
|
@ -1145,9 +1145,7 @@ class EventsStore(EventsWorkerStore):
|
|||
"url" in event.content
|
||||
and isinstance(event.content["url"], basestring)
|
||||
),
|
||||
}
|
||||
for event, _ in events_and_contexts
|
||||
],
|
||||
},
|
||||
)
|
||||
|
||||
def _store_rejected_events_txn(self, txn, events_and_contexts):
|
||||
|
|
Loading…
Reference in New Issue