fix(cmd/influx): fix bug that causes long startup when running 'influx help' or related commands
parent
7b758a4103
commit
0664dbc47d
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
|
1. [15777](https://github.com/influxdata/influxdb/pull/15777): Fix long startup when running 'influx help'
|
||||||
1. [15731](https://github.com/influxdata/influxdb/pull/15731): Ensure array cursor iterator stats accumulate all cursor stats
|
1. [15731](https://github.com/influxdata/influxdb/pull/15731): Ensure array cursor iterator stats accumulate all cursor stats
|
||||||
|
|
||||||
## v2.0.0-alpha.19 [2019-10-30]
|
## v2.0.0-alpha.19 [2019-10-30]
|
||||||
|
|
|
@ -4,9 +4,11 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/influxdata/flux"
|
||||||
"github.com/influxdata/flux/repl"
|
"github.com/influxdata/flux/repl"
|
||||||
|
_ "github.com/influxdata/flux/stdlib"
|
||||||
platform "github.com/influxdata/influxdb"
|
platform "github.com/influxdata/influxdb"
|
||||||
_ "github.com/influxdata/influxdb/query/builtin"
|
_ "github.com/influxdata/influxdb/query/stdlib"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
@ -76,6 +78,8 @@ func fluxQueryF(cmd *cobra.Command, args []string) error {
|
||||||
orgID = o.ID
|
orgID = o.ID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flux.FinalizeBuiltIns()
|
||||||
|
|
||||||
r, err := getFluxREPL(flags.host, flags.token, orgID)
|
r, err := getFluxREPL(flags.host, flags.token, orgID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to get the flux REPL: %v", err)
|
return fmt.Errorf("failed to get the flux REPL: %v", err)
|
||||||
|
|
|
@ -6,10 +6,11 @@ import (
|
||||||
|
|
||||||
"github.com/influxdata/flux"
|
"github.com/influxdata/flux"
|
||||||
"github.com/influxdata/flux/repl"
|
"github.com/influxdata/flux/repl"
|
||||||
|
_ "github.com/influxdata/flux/stdlib"
|
||||||
platform "github.com/influxdata/influxdb"
|
platform "github.com/influxdata/influxdb"
|
||||||
"github.com/influxdata/influxdb/http"
|
"github.com/influxdata/influxdb/http"
|
||||||
"github.com/influxdata/influxdb/query"
|
"github.com/influxdata/influxdb/query"
|
||||||
_ "github.com/influxdata/influxdb/query/builtin"
|
_ "github.com/influxdata/influxdb/query/stdlib"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
@ -70,6 +71,8 @@ func replF(cmd *cobra.Command, args []string) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flux.FinalizeBuiltIns()
|
||||||
|
|
||||||
r, err := getFluxREPL(flags.host, flags.token, orgID)
|
r, err := getFluxREPL(flags.host, flags.token, orgID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue