{"id":17275279,"url":"https://github.com/jflinter/sweetry","last_synced_at":"2025-04-14T09:11:55.315Z","repository":{"id":145373526,"uuid":"47908376","full_name":"jflinter/Sweetry","owner":"jflinter","description":"Retry things!","archived":false,"fork":false,"pushed_at":"2015-12-13T06:14:55.000Z","size":8,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T09:11:39.863Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jflinter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-13T06:12:14.000Z","updated_at":"2018-12-17T17:37:22.000Z","dependencies_parsed_at":"2023-04-15T19:26:17.609Z","dependency_job_id":null,"html_url":"https://github.com/jflinter/Sweetry","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jflinter%2FSweetry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jflinter%2FSweetry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jflinter%2FSweetry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jflinter%2FSweetry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jflinter","download_url":"https://codeload.github.com/jflinter/Sweetry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248852182,"owners_count":21171842,"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":"2024-10-15T08:55:50.527Z","updated_at":"2025-04-14T09:11:55.285Z","avatar_url":"https://github.com/jflinter.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"Sweetry\n===\n\nSweetry is a small Swift framework that allows for retrying operations that might fail. It depends on the (excellent) [BrightFutures](https://github.com/Thomvis/BrightFutures) library by @thomvis.\n\nInstallation\n---\n\nTo install via Carthage, add the following to your `Cartfile`:\n```\ngithub \"jflinter/sweetry\", ~\u003e 0.1\n```\n\nExample usage\n---\n\n```swift\n\nRetry(maxAttempts: 3, operation: {\n  let promise = Promise\u003cMyValue, MyError\u003e()\n  doSomeWorkThatMightFail({ result in\n    promise.complete(result)\n  })\n  return promise.future\n}).start()\n\n```\n\nBackoff strategy\n---\n\nYou can customize the schedule at which a Retry will re-attempt its work by passing it a `BackoffStrategy` in its initializer. The library implements two concrete implementations of this protocol, `Linear` and `Exponential`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjflinter%2Fsweetry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjflinter%2Fsweetry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjflinter%2Fsweetry/lists"}