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 TODOs #1123

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/dance/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ func main() {
}

if pusherClient != nil {
// TODO https://github.com/FerretDB/dance/issues/1122
if err = pusherClient.Push(ctx, cf, db, cmp.Passed); err != nil {
log.Fatal(err)
}
Expand Down
4 changes: 4 additions & 0 deletions internal/pusher/pusher.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ func New(uri string, l *slog.Logger) (*Client, error) {
}

// ping pings the database until connection is established or ctx is canceled.
//
// TODO https://github.com/FerretDB/dance/issues/1122
func (c *Client) ping(ctx context.Context) {
for ctx.Err() == nil {
pingCtx, pingCancel := context.WithTimeout(ctx, 5*time.Second)
Expand Down Expand Up @@ -154,6 +156,8 @@ func (c *Client) Push(ctx context.Context, config, database string, res map[stri
}

// Close closes all connections.
//
// TODO https://github.com/FerretDB/dance/issues/1122
func (c *Client) Close() {
c.pingerCancel()
<-c.pingerDone
Expand Down
Loading