Fix Exception Loop in bot_app.py #9
Labels
No labels
Bug
Feature
Feedback Wanted
Refactoring
Won't Do
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: waifu/kemoverse#9
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
bot_app.py is set up in such a way that should the bot encounter an exception anywhere in
stream_notifications()
, it will remail stuck, looping over the same few notifications forever, potentially spamming users.The root cause of this is that
last_seen_notif_id
is only ever updated if the bot processes a batch of notifications successfully. The function should be updated so that the bot continues to process messages in the batch after an exception has occured and marks the erroneous message as read.