Skip to content

Is it possible to let the function know that it's the last retry? #19

@FlippFuzz

Description

@FlippFuzz

My use case is to perform an LLM call to generate subtitles.
LLMs aren't that reliable, which is why I'm using this wonderful retry library.

@retry(wait_fixed=20000, stop_max_attempt_number=3)
def generate_subtitles(self, video_file: File) -> GenerateSubtitleResponse:
   ...
   # Perform checks and throw exceptions as needed.

What I am looking for is a way to know that this is my last retry.
On my last retry, I would like to weaken the checks and just return whatever is available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions