summary refs log tree commit diff
path: root/synapse/appservice/api.py
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-03-10 10:04:20 +0000
committerKegan Dougal <kegan@matrix.org>2015-03-10 10:04:20 +0000
commitdb1fbc6c6fb23ab92dd712aa60f0ff46ea76b42c (patch)
tree41ebbc0487f24ec3af9210ef1e0633a35d8ee43c /synapse/appservice/api.py
parentRemove unused import (diff)
downloadsynapse-db1fbc6c6fb23ab92dd712aa60f0ff46ea76b42c.tar.xz
Fix remaining scheduler bugs. Add more informative logging.
Diffstat (limited to 'synapse/appservice/api.py')
-rw-r--r--synapse/appservice/api.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/synapse/appservice/api.py b/synapse/appservice/api.py
index 3acb8867a2..2a9becccb3 100644
--- a/synapse/appservice/api.py
+++ b/synapse/appservice/api.py
@@ -83,9 +83,8 @@ class ApplicationServiceApi(SimpleHttpClient):
 
         uri = service.url + ("/transactions/%s" %
                              urllib.quote(txn_id))
-        response = None
         try:
-            response = yield self.put_json(
+            yield self.put_json(
                 uri=uri,
                 json_body={
                     "events": events
@@ -93,9 +92,8 @@ class ApplicationServiceApi(SimpleHttpClient):
                 args={
                     "access_token": service.hs_token
                 })
-            if response:  # just an empty json object
-                # TODO: Mark txn as sent successfully
-                defer.returnValue(True)
+            defer.returnValue(True)
+            return
         except CodeMessageException as e:
             logger.warning("push_bulk to %s received %s", uri, e.code)
         except Exception as ex: