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

feat: surface some globals around restarts for the manage command #58

Merged
merged 2 commits into from
Mar 10, 2020

Conversation

mdevilliers
Copy link
Contributor

No description provided.

Signed-off-by: Mark deVilliers <markdevilliers@gmail.com>
@mdevilliers mdevilliers changed the title surface some globals around restarts for the manage command feat: surface some globals around restarts for the manage command Mar 9, 2020
manageCmd.Flags().DurationVar(&params.GlobalConnectorRestartPeriod, "global-connector-restart-period", params.GlobalConnectorRestartPeriod, "period of time between failed connector restarts")
_ = viper.BindPFlag("global-connector-restart-period", manageCmd.PersistentFlags().Lookup("global-connector-restart-period"))

manageCmd.Flags().IntVar(&params.GlobalMaxTaskRestarts, "global-task-max-restarts", params.GlobalMaxTaskRestarts, "maximum times a failed task will be restarted")
Copy link
Contributor

Choose a reason for hiding this comment

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

max-task or task-max?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@@ -82,6 +90,18 @@ if you specify --once then it will sync once and then exit.`,
manageCmd.Flags().DurationVar(&params.HTTPClientTimeout, "http-client-timeout", params.HTTPClientTimeout, "HTTP client timeout")
_ = viper.BindPFlag("http-client-timeout", manageCmd.PersistentFlags().Lookup("http-client-timeout"))

manageCmd.Flags().IntVar(&params.GlobalMaxConnectorRestarts, "global-connector-max-restarts", params.GlobalMaxConnectorRestarts, "maximum times a failed connector will be restarted")
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe these strings could be const as they appear in a couple of places?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think that would be an improvement.

Copy link
Contributor

Choose a reason for hiding this comment

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

Im talking about these strings global-connector-max-restarts etc... I think it is an improvement to move these into consts.

the4thamigo-uk
the4thamigo-uk previously approved these changes Mar 9, 2020
Signed-off-by: Mark deVilliers <markdevilliers@gmail.com>
@mdevilliers mdevilliers force-pushed the implelment_restart_task_policy branch from 7f9544c to 290ed03 Compare March 9, 2020 14:00
@mdevilliers mdevilliers merged commit ee4ef78 into master Mar 10, 2020
@mdevilliers mdevilliers deleted the implelment_restart_task_policy branch March 10, 2020 12:23
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