Harry Baker

    Harry Baker

    1 year ago
    is there way to pass in a parameter for retry_delay in a task? i have a task that imports google sheets, and want to set up some kind of exponential backoff to my attempts whenever i run into the API limit.
    Kevin Kho

    Kevin Kho

    1 year ago
    Hey @Harry Baker, unfortunately we don’t have exponential backoff. Are you on Cloud? You could use the task concurrency limiting and set it close to the API limit.
    Harry Baker

    Harry Baker

    1 year ago
    i'm probably gonna end up running everything from a local server, but might look into that. would it cause issues to have try/except logic within a task to create escalating wait times?
    Kevin Kho

    Kevin Kho

    1 year ago
    It wouldn’t…but how would you go about keeping the state for the next exponential retry?
    Harry Baker

    Harry Baker

    1 year ago
    yeah this is probably just gonna cause more issues. the amount of data i'm working with isn't that big so i can just throw in a couple time.sleep() calls to avoid hitting the API limit until i can figure out a more elegant solution
    Kevin Kho

    Kevin Kho

    1 year ago
    Yeah a random integer with
    time.sleep(2**x)
    would work.