Skip to content

Commit

Permalink
refactor: Prefer using create_task to old style ensure_future.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcass77 committed Aug 4, 2020
1 parent 4ef4880 commit 0e11885
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="wtfix",
version="0.15.1",
version="0.15.2",
author="John Cass",
author_email="[email protected]",
description="The Pythonic Financial Information eXchange (FIX) client for humans.",
Expand Down
3 changes: 1 addition & 2 deletions wtfix/apps/api/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ def post(self):
args = self.parser.parse_args()
message = decoders.from_json(args["message"])

loop = asyncio.get_event_loop()
asyncio.ensure_future(self.app.send(message), loop=loop)
asyncio.create_task(self.app.send(message))

return JsonResultResponse(
True,
Expand Down

0 comments on commit 0e11885

Please sign in to comment.