-
Notifications
You must be signed in to change notification settings - Fork 76
Let users scale a pg to zero #185
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
Conversation
I need to test this more to find a consistently good way to keep track of connection counts. |
I think I should ignore connections to the |
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.
Few notes
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.
LGTM. Few nits, but not critical.
cmd/start/main.go
Outdated
if current > 1 { | ||
continue | ||
} | ||
return errors.New("scale to zero condition hit") |
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.
Nit: Should just use fmt.Errorf
here.
} | ||
} | ||
|
||
func getCurrentConnCount(ctx context.Context, node *flypg.Node) (int, error) { |
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.
Nit: At some point this should be moved to the admin package.
No description provided.