mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Remove the PushersTable and EventPushActionsTable objects
This commit is contained in:
parent
31de2953a3
commit
a8e9e0b916
@ -42,7 +42,7 @@ class EventPushActionsStore(SQLBaseStore):
|
|||||||
yield self.runInteraction(
|
yield self.runInteraction(
|
||||||
"set_actions_for_event_and_users",
|
"set_actions_for_event_and_users",
|
||||||
self._simple_insert_many_txn,
|
self._simple_insert_many_txn,
|
||||||
EventPushActionsTable.table_name,
|
"event_push_actions",
|
||||||
values
|
values
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -104,7 +104,3 @@ class EventPushActionsStore(SQLBaseStore):
|
|||||||
"remove_push_actions_for_event_id",
|
"remove_push_actions_for_event_id",
|
||||||
f
|
f
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class EventPushActionsTable(object):
|
|
||||||
table_name = "event_push_actions"
|
|
||||||
|
@ -86,7 +86,7 @@ class PusherStore(SQLBaseStore):
|
|||||||
try:
|
try:
|
||||||
next_id = yield self._pushers_id_gen.get_next()
|
next_id = yield self._pushers_id_gen.get_next()
|
||||||
yield self._simple_upsert(
|
yield self._simple_upsert(
|
||||||
PushersTable.table_name,
|
"pushers",
|
||||||
dict(
|
dict(
|
||||||
app_id=app_id,
|
app_id=app_id,
|
||||||
pushkey=pushkey,
|
pushkey=pushkey,
|
||||||
@ -114,7 +114,7 @@ class PusherStore(SQLBaseStore):
|
|||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def delete_pusher_by_app_id_pushkey_user_name(self, app_id, pushkey, user_name):
|
def delete_pusher_by_app_id_pushkey_user_name(self, app_id, pushkey, user_name):
|
||||||
yield self._simple_delete_one(
|
yield self._simple_delete_one(
|
||||||
PushersTable.table_name,
|
"pushers",
|
||||||
{"app_id": app_id, "pushkey": pushkey, 'user_name': user_name},
|
{"app_id": app_id, "pushkey": pushkey, 'user_name': user_name},
|
||||||
desc="delete_pusher_by_app_id_pushkey_user_name",
|
desc="delete_pusher_by_app_id_pushkey_user_name",
|
||||||
)
|
)
|
||||||
@ -122,7 +122,7 @@ class PusherStore(SQLBaseStore):
|
|||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def update_pusher_last_token(self, app_id, pushkey, user_name, last_token):
|
def update_pusher_last_token(self, app_id, pushkey, user_name, last_token):
|
||||||
yield self._simple_update_one(
|
yield self._simple_update_one(
|
||||||
PushersTable.table_name,
|
"pushers",
|
||||||
{'app_id': app_id, 'pushkey': pushkey, 'user_name': user_name},
|
{'app_id': app_id, 'pushkey': pushkey, 'user_name': user_name},
|
||||||
{'last_token': last_token},
|
{'last_token': last_token},
|
||||||
desc="update_pusher_last_token",
|
desc="update_pusher_last_token",
|
||||||
@ -132,7 +132,7 @@ class PusherStore(SQLBaseStore):
|
|||||||
def update_pusher_last_token_and_success(self, app_id, pushkey, user_name,
|
def update_pusher_last_token_and_success(self, app_id, pushkey, user_name,
|
||||||
last_token, last_success):
|
last_token, last_success):
|
||||||
yield self._simple_update_one(
|
yield self._simple_update_one(
|
||||||
PushersTable.table_name,
|
"pushers",
|
||||||
{'app_id': app_id, 'pushkey': pushkey, 'user_name': user_name},
|
{'app_id': app_id, 'pushkey': pushkey, 'user_name': user_name},
|
||||||
{'last_token': last_token, 'last_success': last_success},
|
{'last_token': last_token, 'last_success': last_success},
|
||||||
desc="update_pusher_last_token_and_success",
|
desc="update_pusher_last_token_and_success",
|
||||||
@ -142,12 +142,8 @@ class PusherStore(SQLBaseStore):
|
|||||||
def update_pusher_failing_since(self, app_id, pushkey, user_name,
|
def update_pusher_failing_since(self, app_id, pushkey, user_name,
|
||||||
failing_since):
|
failing_since):
|
||||||
yield self._simple_update_one(
|
yield self._simple_update_one(
|
||||||
PushersTable.table_name,
|
"pushers",
|
||||||
{'app_id': app_id, 'pushkey': pushkey, 'user_name': user_name},
|
{'app_id': app_id, 'pushkey': pushkey, 'user_name': user_name},
|
||||||
{'failing_since': failing_since},
|
{'failing_since': failing_since},
|
||||||
desc="update_pusher_failing_since",
|
desc="update_pusher_failing_since",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class PushersTable(object):
|
|
||||||
table_name = "pushers"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user