{"id":17122663,"url":"https://github.com/rye/eb","last_synced_at":"2025-09-08T08:44:53.278Z","repository":{"id":35019731,"uuid":"196412571","full_name":"rye/eb","owner":"rye","description":"♻️ Run commands with exponential backoff 📈","archived":false,"fork":false,"pushed_at":"2025-03-27T23:04:51.000Z","size":477,"stargazers_count":81,"open_issues_count":16,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T00:19:41.609Z","etag":null,"topics":["clap-rs","cli","exponential-backoff","hacktoberfest","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rye.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-11T14:40:21.000Z","updated_at":"2025-02-19T23:53:06.000Z","dependencies_parsed_at":"2024-01-23T19:47:00.862Z","dependency_job_id":"9262e015-b70e-43a7-a9d8-7f068cd18fb8","html_url":"https://github.com/rye/eb","commit_stats":{"total_commits":291,"total_committers":5,"mean_commits":58.2,"dds":0.5773195876288659,"last_synced_commit":"87263f634fced022d47a992abcd255cd0f35f48a"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rye%2Feb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rye%2Feb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rye%2Feb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rye%2Feb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rye","download_url":"https://codeload.github.com/rye/eb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247156284,"owners_count":20893197,"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":["clap-rs","cli","exponential-backoff","hacktoberfest","rust"],"created_at":"2024-10-14T18:23:30.236Z","updated_at":"2025-04-04T10:05:07.577Z","avatar_url":"https://github.com/rye.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eb\n\n`eb` is a small utility that runs a command with exponential backoff.\n\n`eb` only exits once a status code of `0` has been returned by the command it is calling, or once killed by a \u003ckbd\u003eCtrl+C\u003c/kbd\u003e or other signal.\n\nYou can use `eb` much like `watch`:\n\n```console\n$ eb -- ssh -oConnectTimeout=0 host\n```\n\n## Installing it\n\nYou can install `eb` via\n\n```console\n$ cargo install eb\n```\n\nand you can update it via the same command.\n\n### Features\n\nWe currently support these (cargo) features:\n\n- **`simple_logger`** enables the `simple_logger` logger.\n\nThere are _no features_ enabled by default.\n\n## The algorithm\n\nIn the above console input, `eb` will watch the command and keep track of how long it takes to fail.\nUpon the first failure, a \"slot time\" is set to the time it took for the command to fail.\n\nIn each instance, after `n` failures, a random number of slot times between `0` and `2^n - 1` is chosen, and these slot times are delayed through.\nSo, after the first failure, `eb` will either wait `0` or `1` slot times; after the second failure this number increases to between `0` and `3`.\nThe exponent `n` is `clamp`ed to be within the range `0` and `MAX_N` where `MAX_N` is some predefined number; in our case this is `10`.\nIn practice, this means that after `10` collisions, the possible upper bound on delay does not increase.\nBecause commands take a variable amount of time to complete, the slot time is adjusted to be the _average_ of all execution times.\nThe delay will start very quickly after the command fails.\n\nBecause of the way the algorithm works, it is recommended to use `eb` in situations where the given command will fail quickly.\nThis will result in a proportionally small maximum delay time.\n\n## License\n\n```\neb: A command executor exercising exponential backoff\nCopyright (C) 2019-2021 Kristofer J. Rye\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frye%2Feb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frye%2Feb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frye%2Feb/lists"}