From 3bce4931307581c7260a2b1b29aee946d8230220 Mon Sep 17 00:00:00 2001 From: shadeofblue Date: Wed, 9 Jun 2021 18:53:24 +0200 Subject: [PATCH] make the default `Service.run()` await indefinitely instead of yielding `None` in a loop --- yapapi/services.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/yapapi/services.py b/yapapi/services.py index 3440ca631..6558b6563 100644 --- a/yapapi/services.py +++ b/yapapi/services.py @@ -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."""