anonymousland-synapse/synapse/rest/client/v2_alpha
Kegan Dougal 2771447c29 Store Promise<Response> instead of Response for HTTP API transactions
This fixes a race whereby:
 - User hits an endpoint.
 - No cached transaction so executes main code.
 - User hits same endpoint.
 - No cache transaction so executes main code.
 - Main code finishes executing and caches response and returns.
 - Main code finishes executing and caches response and returns.

 This race is common in the wild when Synapse is struggling under load.
 This commit fixes the race by:
  - User hits an endpoint.
  - Caches the promise to execute the main code and executes main code.
  - User hits same endpoint.
  - Yields on the same promise as the first request.
  - Main code finishes executing and returns, unblocking both requests.
2016-11-10 14:49:26 +00:00
..
__init__.py copyrights 2016-01-07 04:26:29 +00:00
_base.py GET /devices endpoint 2016-07-20 16:42:32 +01:00
account_data.py Use parse_json_object_from_request to parse JSON out of request bodies 2016-03-11 16:41:03 +00:00
account.py Add hs object 2016-07-14 10:25:52 +01:00
auth.py window.postmessage for Interactive Auth fallback 2016-10-06 18:16:59 +01:00
devices.py Handle delete device requests with no body 2016-10-12 18:47:28 +01:00
filter.py Refactor test_filter to use real DataStore 2016-10-18 12:17:38 -05:00
keys.py Move the E2E key handling into the e2e handler 2016-09-13 11:35:35 +01:00
notifications.py Implement only=highlight on /notifications 2016-09-08 13:43:35 +01:00
openid.py Rename openid/token to openid/request_token 2016-05-05 15:15:00 +01:00
receipts.py Move the presence handler out of the Handlers object 2016-05-16 18:56:37 +01:00
register.py Add helper function for getting access_tokens from requests 2016-09-09 16:33:15 +01:00
report_event.py Add timestamp and auto incrementing ID 2016-05-04 15:19:12 +01:00
sendtodevice.py Store Promise<Response> instead of Response for HTTP API transactions 2016-11-10 14:49:26 +00:00
sync.py Add store-and-forward direct-to-device messaging 2016-08-25 17:35:37 +01:00
tags.py Use parse_json_object_from_request to parse JSON out of request bodies 2016-03-11 16:41:03 +00:00
thirdparty.py Merge pull request #1096 from matrix-org/markjh/get_access_token 2016-09-09 17:09:27 +01:00
tokenrefresh.py Add device_id support to /login 2016-07-18 16:39:44 +01:00