Add placement of before_server_start and after_server_stop

This commit is contained in:
Adam Hopkins
2019-06-04 12:59:15 +03:00
parent 3685b4de85
commit daf42c5f43
2 changed files with 18 additions and 24 deletions

View File

@@ -55,7 +55,7 @@ async def handler_stream(request):
break
body = body.decode("utf-8").replace("1", "A")
# await response.write(body)
return stream(streaming)
return response.stream(body)
@app.listener("before_server_start")