mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-07 21:24:57 -04:00
Convert some of the general database methods to async (#8100)
This commit is contained in:
parent
e04e465b4d
commit
050e20e7ca
13 changed files with 69 additions and 59 deletions
|
@ -847,13 +847,15 @@ class EventsWorkerStore(SQLBaseStore):
|
|||
"""Given a list of event ids, check if we have already processed and
|
||||
stored them as non outliers.
|
||||
"""
|
||||
rows = yield self.db_pool.simple_select_many_batch(
|
||||
table="events",
|
||||
retcols=("event_id",),
|
||||
column="event_id",
|
||||
iterable=list(event_ids),
|
||||
keyvalues={"outlier": False},
|
||||
desc="have_events_in_timeline",
|
||||
rows = yield defer.ensureDeferred(
|
||||
self.db_pool.simple_select_many_batch(
|
||||
table="events",
|
||||
retcols=("event_id",),
|
||||
column="event_id",
|
||||
iterable=list(event_ids),
|
||||
keyvalues={"outlier": False},
|
||||
desc="have_events_in_timeline",
|
||||
)
|
||||
)
|
||||
|
||||
return {r["event_id"] for r in rows}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue