Merge branch 'hotfixes-0.7.0e' of github.com:matrix-org/synapse

This commit is contained in:
Erik Johnston 2015-02-13 16:19:32 +00:00
commit d502013c6e
3 changed files with 13 additions and 13 deletions

View file

@ -16,4 +16,4 @@
""" This is a reference implementation of a Matrix home server. """ This is a reference implementation of a Matrix home server.
""" """
__version__ = "0.7.0d" __version__ = "0.7.0e"

View file

@ -237,7 +237,7 @@ class Pusher(object):
self.user_name, config, timeout=0) self.user_name, config, timeout=0)
self.last_token = chunk['end'] self.last_token = chunk['end']
self.store.update_pusher_last_token( self.store.update_pusher_last_token(
self.user_name, self.pushkey, self.last_token) self.app_id, self.pushkey, self.last_token)
logger.info("Pusher %s for user %s starting from token %s", logger.info("Pusher %s for user %s starting from token %s",
self.pushkey, self.user_name, self.last_token) self.pushkey, self.user_name, self.last_token)
@ -308,7 +308,7 @@ class Pusher(object):
self.backoff_delay = Pusher.INITIAL_BACKOFF self.backoff_delay = Pusher.INITIAL_BACKOFF
self.last_token = chunk['end'] self.last_token = chunk['end']
self.store.update_pusher_last_token_and_success( self.store.update_pusher_last_token_and_success(
self.user_name, self.app_id,
self.pushkey, self.pushkey,
self.last_token, self.last_token,
self.clock.time_msec() self.clock.time_msec()
@ -316,14 +316,14 @@ class Pusher(object):
if self.failing_since: if self.failing_since:
self.failing_since = None self.failing_since = None
self.store.update_pusher_failing_since( self.store.update_pusher_failing_since(
self.user_name, self.app_id,
self.pushkey, self.pushkey,
self.failing_since) self.failing_since)
else: else:
if not self.failing_since: if not self.failing_since:
self.failing_since = self.clock.time_msec() self.failing_since = self.clock.time_msec()
self.store.update_pusher_failing_since( self.store.update_pusher_failing_since(
self.user_name, self.app_id,
self.pushkey, self.pushkey,
self.failing_since self.failing_since
) )
@ -340,14 +340,14 @@ class Pusher(object):
self.backoff_delay = Pusher.INITIAL_BACKOFF self.backoff_delay = Pusher.INITIAL_BACKOFF
self.last_token = chunk['end'] self.last_token = chunk['end']
self.store.update_pusher_last_token( self.store.update_pusher_last_token(
self.user_name, self.app_id,
self.pushkey, self.pushkey,
self.last_token self.last_token
) )
self.failing_since = None self.failing_since = None
self.store.update_pusher_failing_since( self.store.update_pusher_failing_since(
self.user_name, self.app_id,
self.pushkey, self.pushkey,
self.failing_since self.failing_since
) )

View file

@ -126,27 +126,27 @@ class PusherStore(SQLBaseStore):
) )
@defer.inlineCallbacks @defer.inlineCallbacks
def update_pusher_last_token(self, user_name, pushkey, last_token): def update_pusher_last_token(self, app_id, pushkey, last_token):
yield self._simple_update_one( yield self._simple_update_one(
PushersTable.table_name, PushersTable.table_name,
{'user_name': user_name, 'pushkey': pushkey}, {'app_id': app_id, 'pushkey': pushkey},
{'last_token': last_token} {'last_token': last_token}
) )
@defer.inlineCallbacks @defer.inlineCallbacks
def update_pusher_last_token_and_success(self, user_name, pushkey, def update_pusher_last_token_and_success(self, app_id, pushkey,
last_token, last_success): last_token, last_success):
yield self._simple_update_one( yield self._simple_update_one(
PushersTable.table_name, PushersTable.table_name,
{'user_name': user_name, 'pushkey': pushkey}, {'app_id': app_id, 'pushkey': pushkey},
{'last_token': last_token, 'last_success': last_success} {'last_token': last_token, 'last_success': last_success}
) )
@defer.inlineCallbacks @defer.inlineCallbacks
def update_pusher_failing_since(self, user_name, pushkey, failing_since): def update_pusher_failing_since(self, app_id, pushkey, failing_since):
yield self._simple_update_one( yield self._simple_update_one(
PushersTable.table_name, PushersTable.table_name,
{'user_name': user_name, 'pushkey': pushkey}, {'app_id': app_id, 'pushkey': pushkey},
{'failing_since': failing_since} {'failing_since': failing_since}
) )