Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Rename txn functions with _txn suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizzadar committed Aug 23, 2022
1 parent 2531eee commit 55f587c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions synapse/storage/databases/main/event_push_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ async def get_unread_push_actions_for_user_in_range_for_http(
),
)

def get_push_actions(
def get_push_actions_txn(
txn: LoggingTransaction,
) -> List[Tuple[str, str, int, str, bool]]:
sql = """
Expand All @@ -533,7 +533,7 @@ def get_push_actions(
return cast(List[Tuple[str, str, int, str, bool]], txn.fetchall())

push_actions = await self.db_pool.runInteraction(
"get_unread_push_actions_for_user_in_range_http", get_push_actions
"get_unread_push_actions_for_user_in_range_http", get_push_actions_txn
)

notifs = [
Expand Down Expand Up @@ -590,7 +590,7 @@ async def get_unread_push_actions_for_user_in_range_for_email(
),
)

def get_push_actions(
def get_push_actions_txn(
txn: LoggingTransaction,
) -> List[Tuple[str, str, int, str, bool, int]]:
sql = """
Expand All @@ -609,7 +609,7 @@ def get_push_actions(
return cast(List[Tuple[str, str, int, str, bool, int]], txn.fetchall())

push_actions = await self.db_pool.runInteraction(
"get_unread_push_actions_for_user_in_range_email", get_push_actions
"get_unread_push_actions_for_user_in_range_email", get_push_actions_txn
)

# Make a list of dicts from the two sets of results.
Expand Down

0 comments on commit 55f587c

Please sign in to comment.