Skip to content

Potential Unhandled Exceptions in Perpetual Tasks #361

@MarkKoz

Description

@MarkKoz

The bot often makes use of the pattern of loop.create_task with tasks that are meant to run perpetually. However, there are no provisions for restarting tasks should any exceptions occur in them.

Discord.py's tasks extension looks promising and that could be used going forward. As an alternative, some wrapper could be created that just logs exceptions and tries again, or using Future.add_done_callback. There are probably more possible approaches.

See discussion in #360 for details on a particular case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: backendRelated to internal functionality and utilities (error_handler, logging, security, utils and core)p: 2 - normalNormal Prioritys: staleHas had no activity for a whilet: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions