Remove unused function

This commit is contained in:
David Baker 2016-04-29 20:10:34 +01:00
parent 6b9b6a9169
commit 35b7b8e4bc
2 changed files with 0 additions and 26 deletions

View File

@ -122,10 +122,6 @@ class EmailPusher(object):
up logging, measures and guards against multiple instances of it
being run.
"""
last_notifs = yield self.store.get_time_of_latest_push_action_by_room_for_user(
self.user_id
)
unprocessed = yield self.store.get_unread_push_actions_for_user_in_range(
self.user_id, self.last_stream_ordering, self.max_stream_ordering
)

View File

@ -212,28 +212,6 @@ class EventPushActionsStore(SQLBaseStore):
)
defer.returnValue(result[0] or 0)
@defer.inlineCallbacks
def get_time_of_latest_push_action_by_room_for_user(self, user_id):
"""
Returns only the received_ts of the last notification in each of the
user's rooms, in a dict by room_id
"""
def f(txn):
txn.execute(
"SELECT ep.room_id, MAX(e.received_ts)"
" FROM event_push_actions AS ep"
" JOIN events e ON ep.room_id = e.room_id AND ep.event_id = e.event_id"
" WHERE ep.user_id = ?"
" GROUP BY ep.room_id",
(user_id,)
)
return txn.fetchall()
result = yield self.runInteraction(
"get_time_of_latest_push_action_by_room_for_user", f
)
defer.returnValue({row[0]: row[1] for row in result})
def _remove_push_actions_for_event_id_txn(self, txn, room_id, event_id):
# Sad that we have to blow away the cache for the whole room here
txn.call_after(