diff options
author | Kegan Dougal <kegan@matrix.org> | 2015-03-09 17:45:41 +0000 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2015-03-09 17:45:41 +0000 |
commit | 04c9751f24885b974d564b3e5749b7fc9ce01c73 (patch) | |
tree | cb62723909589e3ad8e3a1a8a3aaedfb3deb6fac /synapse/appservice | |
parent | Use event IDs instead of dumping event content in the txns table. (diff) | |
download | synapse-04c9751f24885b974d564b3e5749b7fc9ce01c73.tar.xz |
Bug fixes whilst putting it all together
Diffstat (limited to 'synapse/appservice')
-rw-r--r-- | synapse/appservice/api.py | 1 | ||||
-rw-r--r-- | synapse/appservice/scheduler.py | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/synapse/appservice/api.py b/synapse/appservice/api.py index c17fb219c5..3acb8867a2 100644 --- a/synapse/appservice/api.py +++ b/synapse/appservice/api.py @@ -79,6 +79,7 @@ class ApplicationServiceApi(SimpleHttpClient): logger.warning("push_bulk: Missing txn ID sending events to %s", service.url) txn_id = str(0) + txn_id = str(txn_id) uri = service.url + ("/transactions/%s" % urllib.quote(txn_id)) diff --git a/synapse/appservice/scheduler.py b/synapse/appservice/scheduler.py index 068d4bd087..3ee2406463 100644 --- a/synapse/appservice/scheduler.py +++ b/synapse/appservice/scheduler.py @@ -175,7 +175,7 @@ class _TransactionController(object): @defer.inlineCallbacks def _is_service_up(self, service): state = yield self.store.get_appservice_state(service) - defer.returnValue(state == ApplicationServiceState.UP) + defer.returnValue(state == ApplicationServiceState.UP or state is None) class _Recoverer(object): @@ -208,6 +208,8 @@ class _Recoverer(object): def retry(self): txn = yield self._get_oldest_txn() if txn: + logger.info("Retrying transaction %s for service %s", + txn.id, txn.service) if txn.send(self.as_api): txn.complete(self.store) # reset the backoff counter and retry immediately |