feat: Send notification when booking is impossible

This commit is contained in:
kbe
2025-07-21 21:07:58 +02:00
parent 13f18b2854
commit d6e9373321
2 changed files with 22 additions and 0 deletions

View File

@@ -513,6 +513,10 @@ class CrossFitBooker:
logging.info(f"Successfully booked {session_type} session at {session_time}")
else:
logging.error(f"Failed to book {session_type} session at {session_time} - Session: {session}")
# Send notification about the failed booking
session_details = f"{session['name_activity']} at {session_time.strftime('%Y-%m-%d %H:%M')}"
await self.notifier.notify_impossible_booking(session_details)
logging.info(f"Notified about impossible booking for {session_type} session at {session_time}")
async def run(self) -> None:
"""