Port replication http server endpoints to async/await

This commit is contained in:
Erik Johnston 2019-10-29 13:00:51 +00:00
parent 561133c3c5
commit e577a4b2ad
6 changed files with 26 additions and 44 deletions

View file

@ -110,14 +110,14 @@ class ReplicationEndpoint(object):
return {}
@abc.abstractmethod
def _handle_request(self, request, **kwargs):
async def _handle_request(self, request, **kwargs):
"""Handle incoming request.
This is called with the request object and PATH_ARGS.
Returns:
Deferred[dict]: A JSON serialisable dict to be used as response
body of request.
tuple[int, dict]: HTTP status code and a JSON serialisable dict
to be used as response body of request.
"""
pass