Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make the default Service.run() await indefinitely instead of yielding None in a loop #448

Merged
merged 4 commits into from
Jun 9, 2021
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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