Skip to content

Commit

Permalink
Add logging to ActionLifespan
Browse files Browse the repository at this point in the history
  • Loading branch information
shirte committed Dec 8, 2024
1 parent d0b56f2 commit 2232d98
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nerdd_backend/lifespan/action_lifespan.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ def __init__(self, action_creator):

async def start(self, app):
self.action = self.action_creator(app)
logger.info(f"Start action {self.action}")

async def run(self):
logger.info(f"Run action {self.action}")
await self.action.run()

async def stop(self):
logger.info(f"Stop action {self.action}")
self.action = None

0 comments on commit 2232d98

Please sign in to comment.