Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jordaneremieff committed Apr 19, 2020
1 parent 88a76cc commit 2e1b2c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mangum/lifespan.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def __post_init__(self) -> None:
self.shutdown_event: asyncio.Event = asyncio.Event()

async def startup(self) -> None:
self.logger.info("Waiting for application startup.")
if self.is_supported:
self.logger.info("Waiting for application startup.")
await self.app_queue.put({"type": "lifespan.startup"})
await self.startup_event.wait()
if self.has_error:
Expand Down Expand Up @@ -61,7 +61,7 @@ async def send(self, message: Message) -> None:
self.startup_event.set()
elif message_type == "lifespan.shutdown.complete":
self.shutdown_event.set()
else: # pragma: no cover
else:
raise RuntimeError(
f"Expected lifespan message type, received: {message_type}"
)

0 comments on commit 2e1b2c0

Please sign in to comment.