-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
Signed-off-by: Mark deVilliers <markdevilliers@gmail.com>
internal/ctl/connectors/manage.go
Outdated
manageCmd.Flags().DurationVar(¶ms.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(¶ms.GlobalMaxTaskRestarts, "global-task-max-restarts", params.GlobalMaxTaskRestarts, "maximum times a failed task will be restarted") |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
internal/ctl/connectors/manage.go
Outdated
@@ -82,6 +90,18 @@ if you specify --once then it will sync once and then exit.`, | |||
manageCmd.Flags().DurationVar(¶ms.HTTPClientTimeout, "http-client-timeout", params.HTTPClientTimeout, "HTTP client timeout") | |||
_ = viper.BindPFlag("http-client-timeout", manageCmd.PersistentFlags().Lookup("http-client-timeout")) | |||
|
|||
manageCmd.Flags().IntVar(¶ms.GlobalMaxConnectorRestarts, "global-connector-max-restarts", params.GlobalMaxConnectorRestarts, "maximum times a failed connector will be restarted") |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Signed-off-by: Mark deVilliers <markdevilliers@gmail.com>
7f9544c
to
290ed03
Compare
No description provided.