Finish synapse.appservice.scheduler implementation.

With tests to assert behaviour. Not hooked up yet. Stub datastore methods
not implemented yet.
This commit is contained in:
Kegan Dougal 2015-03-06 16:09:05 +00:00
parent 7d3491c741
commit 0354659f9d
4 changed files with 186 additions and 53 deletions

View file

@ -354,6 +354,16 @@ class ApplicationServiceTransactionStore(SQLBaseStore):
"""
pass
def get_appservice_state(self, service):
"""Get the application service state.
Args:
service(ApplicationService): The service whose state to set.
Returns:
A Deferred which resolves to ApplicationServiceState.
"""
pass
def set_appservice_state(self, service, state):
"""Set the application service state.
@ -365,6 +375,18 @@ class ApplicationServiceTransactionStore(SQLBaseStore):
"""
pass
def create_appservice_txn(self, service, events):
"""Atomically creates a new transaction for this application service
with the given list of events.
Args:
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.
"""
pass
def complete_appservice_txn(self, txn_id, service):
"""Completes an application service transaction.