Skip to content

Harden Timer stage changes to discord outages #12

@Intery

Description

@Intery

If Timer.change_stage(...) throws an exception while sending the stage change message (potentially due to a Discord hiccup, but also for any other reason), the time remaining will not be updated and the Timer runloop will attempt to change stage again.
This may result in the group members being ejected from the group and large amounts of spam as the change stage messages are re-sent.

Proposed Solution

Move the active stage changing logic to the top of change_stage so that it is always guaranteed to occur, making it independent of Discord and network state.
Additionally, log exceptions that occur through change_stage rather than silence them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbugscope:minorBug doesn't affect most users or featuresdifficulty:easyStraightforward, minimal structural knowledge neededgood first issueGood for newcomersmodule:timer-coreTimer module core functionality (timers, subscribers, timerchannels, etc)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions