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

Add parameter cron for disabling checks not useful when being instantiated by CRON #25

Merged
merged 3 commits into from
Aug 15, 2024

Conversation

unixfox
Copy link
Member

@unixfox unixfox commented Jun 5, 2024

This will help with these issues:

Basically, the HTTP check may not be useful if the script is launched by CRON because the HTTP check is only for telling people that their setup does not work.

People can disable this check by passing --cron.

@unixfox
Copy link
Member Author

unixfox commented Jun 5, 2024

@WardPearce if you can review what I have done :). thank you

@WardPearce
Copy link
Contributor

@WardPearce if you can review what I have done :). thank you

Yes can do, on holiday currently but will check this briefly

Copy link
Contributor

@WardPearce WardPearce left a comment

Choose a reason for hiding this comment

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

Some minor suggestions

smart_ipv6_rotator/__init__.py Outdated Show resolved Hide resolved
@@ -58,6 +58,13 @@
"help": "Completely disables the --services flag.",
},
),
(
"--cron",
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably shouldn't be a shared parameter, as only used for run.

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you mean by that?

Copy link
Contributor

@WardPearce WardPearce Jun 30, 2024

Choose a reason for hiding this comment

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

"SHARED_OPTIONS" is options what are shared between multiple commands.
If a option is only specific to a command, it should prob be added like so https://github.com/iv-org/smart-ipv6-rotator/blob/skip-http-checks-cron/smart_ipv6_rotator/__init__.py#L266

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks. I moved to a static option.

@WardPearce
Copy link
Contributor

Following needs to be updated too

### `run` Subcommand

@unixfox unixfox merged commit 7c10ce5 into master Aug 15, 2024
@unixfox unixfox deleted the skip-http-checks-cron branch August 15, 2024 11:14
@unixfox unixfox mentioned this pull request Aug 15, 2024
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.

2 participants