Apply clarity and docstrings

pull/106/head
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
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)

View File

@ -383,7 +383,7 @@ class ApplicationServiceTransactionStore(SQLBaseStore):
service(ApplicationService): The service who the transaction is for.
events(list<Event>): A list of events to put in the transaction.
Returns:
ApplicationServiceTransaction: A new transaction.
AppServiceTransaction: A new transaction.
"""
pass
@ -399,3 +399,15 @@ class ApplicationServiceTransactionStore(SQLBaseStore):
successfully.
"""
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.
from synapse.appservice import ApplicationServiceState, AppServiceTransaction
from synapse.appservice.scheduler import (
AppServiceScheduler, _EventGrouper, _TransactionController, _Recoverer
_EventGrouper, _TransactionController, _Recoverer
)
from twisted.internet import defer
from ..utils import MockClock