Skip to content

Commit

Permalink
Fix aiohttp README example (#383)
Browse files Browse the repository at this point in the history
Co-authored-by: Joongi Kim <me@daybreaker.info>
  • Loading branch information
mtomilov and achimnol authored Oct 26, 2023
1 parent 6e5fced commit 08f1f2c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ be integrated with it.
# Simple handler that returns response after 100s
async def simple(request):
loop = request.app.loop
print('Start sleeping')
await asyncio.sleep(100)
return web.Response(text="Simple answer")
Expand All @@ -102,7 +100,7 @@ be integrated with it.
# init monitor just before run_app
with aiomonitor.start_monitor(loop=loop, locals=locals_):
# run application with built-in aiohttp run_app function
web.run_app(app, port=port, host=host)
web.run_app(app, port=port, host=host, loop=loop)
Let's save this code in file ``simple_srv.py``, so we can run it with the following command::

Expand Down
1 change: 0 additions & 1 deletion changes/379.misc.md

This file was deleted.

1 change: 1 addition & 0 deletions changes/383.doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add 383 news fragment

0 comments on commit 08f1f2c

Please sign in to comment.