Code Monkey home page Code Monkey logo

retry.jl's People

Contributors

ararslan avatar femtocleaner[bot] avatar jingpengw avatar juliatagbot avatar mattbrzezinski avatar oxinabox avatar samoconnor avatar staticfloat avatar tkelman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

retry.jl's Issues

Backoff constant should be configurable

Currently, if you use @delay_retry then the exponent is the constant 10. This means 5 repeats go from 0.05 -> 0.5 -> 5 -> 50 -> 500.

If for example, you have an API quota which has 60 second windows, you can't repeat 4 times as you would only cover 55.55 seconds. Instead, you need to go to the next one, which is over 8 minutes long. Being able to set a much smaller exponent would make this infinitely more useful. e.g. if 2 is used:

0.05 -> 0.1 -> 0.2 -> 0.4 -> 0.8 -> 1.6 -> 3.2 -> 6.4 -> 12.8 -> 25.6 -> 51.2

This way we only "waste" 42 seconds. Of course, every API and everyone's usage is different, so there many be many even better reasons to make this configurable.

non-boolean `Missing` found in boolean context (1/2 union split): goto %69 if not (e Retry.:(==) Retry.nothing)::Union{Missing, Bool}

julia> JET.@report_call AWSS3.s3_get(AWS.global_aws_config(creds = AWS.AWSCredentials("","")), "bucket", "key")
═════ 3 possible errors found ═════
┌ @ C:\.julia\packages\AWSS3\GTR8D\src\AWSS3.jl:121 AWSS3.:(var"#s3_get#4")(AWSS3.nothing, true, false, AWSS3.nothing, Dict{String, Any}(), false, pairs(NamedTuple()), #self#, aws, bucket, path)
│┌ @ C:\.julia\packages\Retry\vS1bg\src\repeat_try.jl:163 goto %69 if not e Retry.:(==) Retry.nothing
││ non-boolean `Missing` found in boolean context (1/2 union split): goto %69 if not (e Retry.:(==) Retry.nothing)::Union{Missing, Bool}     
│└────────────────────────────────────────────────────────
│┌ @ C:\.julia\packages\Retry\vS1bg\src\repeat_try.jl:163 goto %85 if not AWSS3.in(AWSS3.ecode(e), Base.vect("NoSuchBucket", "NoSuchKey"))   
││ non-boolean `Missing` found in boolean context (1/2 union split): goto %85 if not AWSS3.in(AWSS3.ecode(e::Any)::Any, Base.vect("NoSuchBucket", "NoSuchKey")::Vector{String})::Union{Missing, Bool}
│└────────────────────────────────────────────────────────
│┌ @ C:\.julia\packages\Retry\vS1bg\src\repeat_try.jl:163 goto %69 if not e Retry.:(==) Retry.nothing
││ non-boolean `Missing` found in boolean context (1/2 union split): goto %69 if not (e::Any Retry.:(==) Retry.nothing)::Union{Missing, Bool}
│└────────────────────────────────────────────────────────

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.