{"id":26518902,"url":"https://github.com/vegris/once_more","last_synced_at":"2025-03-21T10:16:26.213Z","repository":{"id":274439989,"uuid":"922925680","full_name":"vegris/once_more","owner":"vegris","description":"Simple retries with composable backoff strategies","archived":false,"fork":false,"pushed_at":"2025-01-27T13:15:41.000Z","size":39,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-15T07:47:34.580Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vegris.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-27T10:41:06.000Z","updated_at":"2025-02-11T06:36:02.000Z","dependencies_parsed_at":"2025-01-27T11:33:14.553Z","dependency_job_id":"9a377eb8-fc4c-4824-966c-c962ec1ab860","html_url":"https://github.com/vegris/once_more","commit_stats":null,"previous_names":["vegris/once_more","vegris/again"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegris%2Fonce_more","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegris%2Fonce_more/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegris%2Fonce_more/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegris%2Fonce_more/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vegris","download_url":"https://codeload.github.com/vegris/once_more/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244776353,"owners_count":20508507,"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":[],"created_at":"2025-03-21T10:16:25.476Z","updated_at":"2025-03-21T10:16:26.206Z","avatar_url":"https://github.com/vegris.png","language":"Elixir","funding_links":[],"categories":["Utilities"],"sub_categories":[],"readme":"# OnceMore\n\n[![Hex.pm Version](https://img.shields.io/hexpm/v/once_more)](https://hex.pm/packages/once_more)\n[![Documentation](https://img.shields.io/badge/documentation-gray)](https://hexdocs.pm/once_more)\n[![CI](https://github.com/vegris/once_more/actions/workflows/ci.yml/badge.svg)](https://github.com/vegris/once_more/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/vegris/once_more/badge.svg?branch=main)](https://coveralls.io/github/vegris/once_more?branch=main)\n\nA flexible retry library for Elixir with composable backoff strategies.\n\nOnceMore allows you to easily retry operations that may fail temporarily, such as network \nrequests or distributed system operations. It supports both simple retries and \nstateful retries with an accumulator.\n\n## Installation\n\nAdd `once_more` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:once_more, \"~\u003e 1.0.0\"}\n  ]\nend\n```\n\n## Features\n\n* Composable backoff strategies via `OnceMore.DelayStreams`\n* Flexible retry predicates - specify precisely what conditions to retry\n* Accumulator support - maintain state between retry attempts\n\n## Quick start\n\n```elixir\nimport OnceMore.DelayStreams\n\n# Basic retry with exponential backoff\nOnceMore.retry(\n  fn -\u003e make_network_call() end,\n  \u0026match?({:error, _}, \u00261),\n  Stream.take(exponential_backoff(), 5)\n)\n\n# Retry with accumulator to track state\nOnceMore.retry_with_acc(\n  fn attempts -\u003e {network_call(), attempts + 1} end,\n  fn result, _attempts -\u003e match?({:error, _}, result) end,\n  0,\n  Stream.take(constant_backoff(), 5)\n)\n\n# Common delay patterns can be composed:\n50                        # Start with 50ms delay\n|\u003e exponential_backoff()  # Increase exponentially\n|\u003e randomize(0.2)         # Add some randomization\n|\u003e cap(1_000)             # Cap at 1 second\n|\u003e Stream.take(5)         # Limit to 5 attempts\n```\n\nFull documentation can be found at https://hexdocs.pm/once_more.\n\n\n## License\n\nLicensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvegris%2Fonce_more","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvegris%2Fonce_more","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvegris%2Fonce_more/lists"}