diff --git a/src/applications/schedule_sync/workflows/sync.py b/src/applications/schedule_sync/workflows/sync.py index 46706be..a0fe9c5 100644 --- a/src/applications/schedule_sync/workflows/sync.py +++ b/src/applications/schedule_sync/workflows/sync.py @@ -30,6 +30,9 @@ class ScheduleSyncWorkflow: streamers = await StreamerConfigRepository().all() for streamer in streamers: + if streamer.integrations.discord is None: + continue + await workflow.start_activity( syncronize, streamer.twitch.id, diff --git a/src/applications/twitch_webhook/notification.py b/src/applications/twitch_webhook/notification.py index 62dc900..b2bc37c 100644 --- a/src/applications/twitch_webhook/notification.py +++ b/src/applications/twitch_webhook/notification.py @@ -45,8 +45,7 @@ async def delete_telegram_message(chat_id: int, message_id: int): } ) - if result.status_code != 200: - return False + result.raise_for_status() except Exception as e: logger.error("Failed to delete telegram message", exc_info=e) return False