-
Notifications
You must be signed in to change notification settings - Fork 224
/
restart.go
50 lines (42 loc) · 1.14 KB
/
restart.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package restart
import (
"context"
"fmt"
"github.com/spf13/cobra"
"github.com/superfly/flyctl/internal/command"
"github.com/superfly/flyctl/internal/flag"
)
func New() *cobra.Command {
const (
long = `This command has been removed. Use 'fly apps restart' instead.`
short = "Restart an application"
usage = "restart [APPNAME]"
)
cmd := command.New(usage, short, long, runRestart,
command.RequireSession,
)
cmd.Args = cobra.RangeArgs(0, 1)
cmd.Hidden = true
flag.Add(cmd,
flag.Bool{
Name: "force",
Shorthand: "f",
Description: "Will issue a restart against each Machine even if there are errors. ( Machines only )",
Default: false,
},
flag.Bool{
Name: "force-stop",
Description: "Performs a force stop against the target Machine. ( Machines only )",
Default: false,
},
flag.Bool{
Name: "skip-health-checks",
Description: "Restarts app without waiting for health checks. ( Machines only )",
Default: false,
},
)
return cmd
}
func runRestart(ctx context.Context) error {
return fmt.Errorf("this command has been removed. please use `fly apps restart` instead")
}