{"id":21569457,"url":"https://github.com/naturalcycles/console-retry","last_synced_at":"2025-08-08T17:06:16.522Z","repository":{"id":62564525,"uuid":"158721155","full_name":"NaturalCycles/console-retry","owner":"NaturalCycles","description":null,"archived":false,"fork":false,"pushed_at":"2019-05-27T14:09:33.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-25T14:56:10.685Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/NaturalCycles.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":"2018-11-22T15:48:52.000Z","updated_at":"2019-05-27T14:13:48.000Z","dependencies_parsed_at":"2022-11-03T16:45:38.358Z","dependency_job_id":null,"html_url":"https://github.com/NaturalCycles/console-retry","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NaturalCycles%2Fconsole-retry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NaturalCycles%2Fconsole-retry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NaturalCycles%2Fconsole-retry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NaturalCycles%2Fconsole-retry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NaturalCycles","download_url":"https://codeload.github.com/NaturalCycles/console-retry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244166677,"owners_count":20409178,"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-11-24T11:09:32.894Z","updated_at":"2025-03-18T05:45:18.763Z","avatar_url":"https://github.com/NaturalCycles.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# console-retry\n\nThis utility is designed to run any shell command and retry if no new line was written to \nstdout within a specified timeout. Especially useful in CI to retry flaky tests/scripts\n\nThe default timeout applies to lines written to stdout of the shell command. \n\nRetry is triggered when:\n* No new line was written to stdout after specified timeout\n\nRetry is not triggered when:\n* The command as a whole takes longer than specified timeout\n* The command returns a non-zero (error) return code\n\nTo be a good bash-citizen the return code is mirrors the return code of the subcommand or 1 if the command never \nfinished in the specified timeout.\n\n# Example use / tests\n\n```\nconsole-retry -t 10 \"echo abcd ; false\" # Immediate fail\nconsole-retry -r 1 \"sleep 70\" # Fail after default timeout = 60\nconsole-retry -s -r 1 -t 10 \"sleep 15\" # Should \"skip timeout and therefore succeed after 15s\"\nconsole-retry -t 10 \"echo abcd ; true\" # Immediate success\nconsole-retry -p -o abcd -t 10 \" sleep 5; echo abc ;sleep 20; false\" # Should Complete with error on second try\nconsole-retry -o abcd -t 10 \" sleep 5; echo abc ;sleep 20; false\" # Should fail after retrymax (no progressive)\nconsole-retry -o abc -t 10 \" sleep 5; echo abc ; false\"           # Should retry max but never with ok\nconsole-retry -o abc -t 10 \"\u003e\u00262 echo abc ; false\"                 # stderr, should retry max\nconsole-retry -o nomatch -t 10 \"\u003e\u00262 echo abc ; false\"             # stderr, should fail immediately\nconsole-retry -o abc -t 10 \"echo abc ; true\"                      # stderr, should succeed immediately\nconsole-retry -o nomatch -t 10 \"\u003e\u00262 echo abc ; sleep 2; echo def; true\"  # Output should be: abc \\ndef\nconsole-retry -t 10 \"\u003e\u00262 echo abc ; sleep 10; echo def; sleep 10; true\" # Staggered output \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaturalcycles%2Fconsole-retry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaturalcycles%2Fconsole-retry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaturalcycles%2Fconsole-retry/lists"}