Skip to content

Commit

Permalink
Remove the old fly pg update command
Browse files Browse the repository at this point in the history
  • Loading branch information
rugwirobaker committed Oct 10, 2022
1 parent 1b74e58 commit 2e77722
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 281 deletions.
12 changes: 11 additions & 1 deletion internal/command/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/spf13/cobra"
"github.com/superfly/flyctl/agent"
"github.com/superfly/flyctl/api"
"github.com/superfly/flyctl/flaps"
"github.com/superfly/flyctl/flypg"
"github.com/superfly/flyctl/internal/command"
)
Expand All @@ -33,7 +34,6 @@ func New() *cobra.Command {
newList(),
newRestart(),
newUsers(),
newUpdate(),
newFailover(),
)

Expand Down Expand Up @@ -174,3 +174,13 @@ func nomadNodeRoles(ctx context.Context, allocs []*api.AllocationStatus) (leader
}
return leader, replicas, nil
}

func releaseLease(ctx context.Context, machine *api.Machine) error {
var client = flaps.FromContext(ctx)

if err := client.ReleaseLease(ctx, machine.ID, machine.LeaseNonce); err != nil {
return fmt.Errorf("failed to release lease: %w", err)
}

return nil
}
280 changes: 0 additions & 280 deletions internal/command/postgres/update.go

This file was deleted.

0 comments on commit 2e77722

Please sign in to comment.