0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-15 14:32:30 +01:00

Apply clarity and docstrings

This commit is contained in:
Kegan Dougal 2015-03-06 16:16:14 +00:00
parent 0354659f9d
commit 2602ddc379
3 changed files with 15 additions and 3 deletions

View file

@ -224,5 +224,5 @@ class _Recoverer(object):
@defer.inlineCallbacks @defer.inlineCallbacks
def _get_oldest_txn(self): def _get_oldest_txn(self):
txn = yield self.store.get_oldest_txn(self.service) txn = yield self.store.get_oldest_unsent_txn(self.service)
defer.returnValue(txn) defer.returnValue(txn)

View file

@ -383,7 +383,7 @@ class ApplicationServiceTransactionStore(SQLBaseStore):
service(ApplicationService): The service who the transaction is for. service(ApplicationService): The service who the transaction is for.
events(list<Event>): A list of events to put in the transaction. events(list<Event>): A list of events to put in the transaction.
Returns: Returns:
ApplicationServiceTransaction: A new transaction. AppServiceTransaction: A new transaction.
""" """
pass pass
@ -399,3 +399,15 @@ class ApplicationServiceTransactionStore(SQLBaseStore):
successfully. successfully.
""" """
pass pass
def get_oldest_unsent_txn(self, service):
"""Get the oldest transaction which has not been sent for this
service.
Args:
service(ApplicationService): The app service to get the oldest txn.
Returns:
A Deferred which resolves to an AppServiceTransaction or
None.
"""
pass

View file

@ -14,7 +14,7 @@
# limitations under the License. # limitations under the License.
from synapse.appservice import ApplicationServiceState, AppServiceTransaction from synapse.appservice import ApplicationServiceState, AppServiceTransaction
from synapse.appservice.scheduler import ( from synapse.appservice.scheduler import (
AppServiceScheduler, _EventGrouper, _TransactionController, _Recoverer _EventGrouper, _TransactionController, _Recoverer
) )
from twisted.internet import defer from twisted.internet import defer
from ..utils import MockClock from ..utils import MockClock