Skip to content

Commit

Permalink
make the default Service.run() await indefinitely instead of yieldi…
Browse files Browse the repository at this point in the history
…ng `None` in a loop (#448)
  • Loading branch information
shadeofblue authored Jun 9, 2021
1 parent 4b2844e commit 017ba49
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions yapapi/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,8 @@ async def start(self):
async def run(self):
"""Implement the `running` state of the service."""

while True:
await asyncio.sleep(10)
yield
await asyncio.Future()
yield

async def shutdown(self):
"""Implement the `stopping` state of the service."""
Expand Down

0 comments on commit 017ba49

Please sign in to comment.