Skip to content

on_attempt callback #89

Open
Open
@AlexHill

Description

@AlexHill

It would be useful to have an on_attempt callback which was called before every invocation of the decorated function - seems like that would complete the callback suite :)

My use-case is updating some state (i.e. "connecting" / "waiting" / "connected") that it's not practical to modify from inside my decorated function. if I wasn't using backoff, I would update the state immediately before and after calling my connect function.

I can make a PR if there's support for this idea!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions