{"id":15755548,"url":"https://github.com/grantbirki/ruby-retry-examples","last_synced_at":"2026-04-29T17:36:52.735Z","repository":{"id":229026281,"uuid":"775564538","full_name":"GrantBirki/ruby-retry-examples","owner":"GrantBirki","description":"A sandbox repository containing examples of Ruby retry logic","archived":false,"fork":false,"pushed_at":"2024-05-16T21:59:22.000Z","size":5645,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T17:08:47.053Z","etag":null,"topics":["examples","retry","ruby","sandbox"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GrantBirki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-21T16:13:24.000Z","updated_at":"2024-03-21T16:21:02.000Z","dependencies_parsed_at":"2024-03-25T16:56:23.915Z","dependency_job_id":"6a11f449-4d78-48e4-a825-ac6e418c3058","html_url":"https://github.com/GrantBirki/ruby-retry-examples","commit_stats":null,"previous_names":["grantbirki/ruby-retry-examples"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrantBirki%2Fruby-retry-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrantBirki%2Fruby-retry-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrantBirki%2Fruby-retry-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrantBirki%2Fruby-retry-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GrantBirki","download_url":"https://codeload.github.com/GrantBirki/ruby-retry-examples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246436380,"owners_count":20776995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["examples","retry","ruby","sandbox"],"created_at":"2024-10-04T08:22:19.468Z","updated_at":"2026-04-29T17:36:52.707Z","avatar_url":"https://github.com/GrantBirki.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ruby-retry-examples 🔄\n\nA sandbox repository containing examples of Ruby retry logic\n\n## Setup 🛠\n\nRun `script/bootstrap` to install dependencies\n\n## Running the examples 🏃‍♂\n\nFind an example you would like to run in the `examples/` directory and run it with:\n\n```bash\nbundle exec ruby examples/\u003cexample_name\u003e.rb\n```\n\n## Best ⭐\n\nMy favorite flavor of retry logic can be found in the [`examples/app_log_only.rb`](examples/app_log_only.rb) file. It demonstrates a dead simple retry method that comes with a `:default` context and you provide your own logger.\n\nNote: If you are going to use the `examples/app_log_only.rb` example, and want to capture the last exception that is rais (i.e you ran out of retries) here is how you can do it:\n\n```ruby\nbegin\n  Retryable.with_context(:default) do\n    puts \"attempting a call to the faulty service...\"\n    fs.call\n  end\nrescue StandardError =\u003e e\n  # you have to capture the entire block other wise it will interfere with the retry logic\n  puts \"ran out of retries, here is the exception: #{e}\"\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrantbirki%2Fruby-retry-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrantbirki%2Fruby-retry-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrantbirki%2Fruby-retry-examples/lists"}