Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CLI wrapper #366

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Added CLI wrapper #366

wants to merge 1 commit into from

Conversation

Yureien
Copy link

@Yureien Yureien commented Oct 9, 2022

Tenacity can now be used as a CLI app to retry shell scripts or apps!

Closes #279

It's not yet complete, some of the advanced functions are left (such as exponential and random wait functions, thinking of a good way to implement those). A changelog is left too, but I wanted your reviews first on whether this is a good change, and if I am following the proper styling/coding guidelines or not.

@mergify
Copy link
Contributor

mergify bot commented Oct 9, 2022

⚠️ No release notes detected. Please make sure to use reno to add a changelog entry.

1 similar comment
Copy link
Contributor

mergify bot commented Dec 3, 2023

⚠️ No release notes detected. Please make sure to use reno to add a changelog entry.

Copy link
Owner

@jd jd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not convinced about the need/usage, but why not. Though there's no test so I'm a bit reluctant to merge that.

@@ -8,5 +8,6 @@ AUTHORS
ChangeLog
.eggs/
doc/_build
venv/
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed

@@ -0,0 +1,3 @@
#!/usr/bin/env python3
from tenacity.__main__ import main
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use console scripts

@@ -18,4 +18,5 @@
setuptools.setup(
setup_requires=["setuptools_scm"],
use_scm_version=True,
scripts=["bin/tenacity"],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use console scripts

dest="ignore_codes",
action="append",
type=int,
help="Status code that should be ignored. This argument can be called multiple times.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
help="Status code that should be ignored. This argument can be called multiple times.",
help="Non-zero status code that should be ignored. This argument can be called multiple times.",

@asqui
Copy link
Contributor

asqui commented Mar 2, 2024

This seems like a nice feature!

Worth mentioning in the release notes, and would be good to have some test coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

You should truly create a shell script for this
3 participants