{"id":27813943,"url":"https://github.com/stsquad/retry","last_synced_at":"2025-08-04T10:34:53.170Z","repository":{"id":6785288,"uuid":"8032510","full_name":"stsquad/retry","owner":"stsquad","description":"A wrapper for retrying failing functions, originally for running rsync on dodgy links","archived":false,"fork":false,"pushed_at":"2024-06-06T12:32:31.000Z","size":46,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-07T02:04:56.989Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/stsquad.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-02-05T16:06:45.000Z","updated_at":"2024-06-06T12:32:34.000Z","dependencies_parsed_at":"2025-05-01T12:07:17.467Z","dependency_job_id":"5eb8822e-3f47-454a-854f-cb86b3e7a078","html_url":"https://github.com/stsquad/retry","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/stsquad/retry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stsquad%2Fretry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stsquad%2Fretry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stsquad%2Fretry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stsquad%2Fretry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stsquad","download_url":"https://codeload.github.com/stsquad/retry/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stsquad%2Fretry/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265443549,"owners_count":23766410,"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-05-01T12:07:14.813Z","updated_at":"2025-07-15T15:38:43.576Z","avatar_url":"https://github.com/stsquad.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"retry.py\n========\n\nA simple wrapper script to keep retrying until a success/fail condition.\n\nI originally wrote this as a simple wrapper script that monitored the return\ncode from rsync and retried the sync if it was non-zero (i.e. failed to complete).\nThis is useful if you have a very dodgy link which occasionally goes down causing\nthe current rsync session to bail-out.\n\nI have since decided it is much more useful as a general purpose retry wrapper so\nI've made it a lot more generic. The original behaviour can be run by:\n\n    retry.py -v -- rsync user@host:path/ .\n\nCollecting Benchmarks\n---------------------\n\nUsing -n and -c you can run something a number of times and collect a\nbenchmark for fast something runs with what pattern of error codes.\nFor example:\n\n    retry.py -n 5 -c -- ./random.sh\n\nGives:\n\n    Results summary:\n    0: 2 times (40.00%), avg time 0.019361 (0.000018 deviation)\n    3: 1 times (20.00%), avg time 0.025896 (0.000000 deviation)\n    4: 2 times (40.00%), avg time 0.011978 (0.000092 deviation)\n\n\nOther Features\n--------------\n\nI've added the -c/--count option for use in testing situations. If you\nhave a program that fails occasionally you can run -n iterations and\nget a summary of the return codes at the end of your run.\n\nIdeally your test program should return different error codes for\ndifferent failure cases.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstsquad%2Fretry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstsquad%2Fretry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstsquad%2Fretry/lists"}