mirror of https://github.com/docker/docs.git
Merge pull request #2552 from nathanleclaire/ls_timeout_nits
Aesthetic nitpicks on ls timeout
This commit is contained in:
commit
02dde087c9
|
@ -223,8 +223,8 @@ var Commands = []cli.Command{
|
|||
},
|
||||
cli.IntFlag{
|
||||
Name: "timeout, t",
|
||||
Usage: fmt.Sprintf("Timeout in seconds, default to %ds", DefaultTimeoutDuration),
|
||||
Value: DefaultTimeoutDuration,
|
||||
Usage: fmt.Sprintf("Timeout in seconds, default to %s", stateTimeoutDuration),
|
||||
Value: lsDefaultTimeout,
|
||||
},
|
||||
},
|
||||
Name: "ls",
|
||||
|
|
|
@ -21,10 +21,10 @@ import (
|
|||
"github.com/skarademir/naturalsort"
|
||||
)
|
||||
|
||||
const DefaultTimeoutDuration = 10
|
||||
const lsDefaultTimeout = 10
|
||||
|
||||
var (
|
||||
stateTimeoutDuration = DefaultTimeoutDuration * time.Second
|
||||
stateTimeoutDuration = lsDefaultTimeout * time.Second
|
||||
)
|
||||
|
||||
// FilterOptions -
|
||||
|
@ -50,7 +50,7 @@ type HostListItem struct {
|
|||
|
||||
func cmdLs(c CommandLine, api libmachine.API) error {
|
||||
stateTimeoutDuration = time.Duration(c.Int("timeout")) * time.Second
|
||||
log.Debugf("ls timeout set to %d seconds", stateTimeoutDuration/time.Second)
|
||||
log.Debugf("ls timeout set to %s", stateTimeoutDuration)
|
||||
|
||||
quiet := c.Bool("quiet")
|
||||
filters, err := parseFilters(c.StringSlice("filter"))
|
||||
|
|
|
@ -22,9 +22,11 @@ parent="smn_machine_subcmds"
|
|||
|
||||
## Timeout
|
||||
|
||||
The `ls` command tries to reach each host in parallel. If a given host does not answer in less than 10 seconds, the `ls` command
|
||||
will state that this host is in `timeout`. In some circumstances (poor connection, high load or while troubleshooting) you may want to
|
||||
increase or decrease this value. You can use the `-t` flag for this purpose with a numerical value in seconds.
|
||||
The `ls` command tries to reach each host in parallel. If a given host does not
|
||||
answer in less than 10 seconds, the `ls` command will state that this host is in
|
||||
`Timeout` state. In some circumstances (poor connection, high load, or while
|
||||
troubleshooting), you may want to increase or decrease this value. You can use
|
||||
the -t flag for this purpose with a numerical value in seconds.
|
||||
|
||||
### Example
|
||||
|
||||
|
|
Loading…
Reference in New Issue