mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
cmd/swarm: fix wait for reporter
This commit is contained in:
parent
c05de65111
commit
acb3149c06
1 changed files with 7 additions and 5 deletions
|
|
@ -144,11 +144,6 @@ func main() {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// wait for metrics reporter to push latest measurements
|
|
||||||
defer func() {
|
|
||||||
time.Sleep(collectionInterval + 1*time.Second)
|
|
||||||
}()
|
|
||||||
|
|
||||||
sort.Sort(cli.FlagsByName(app.Flags))
|
sort.Sort(cli.FlagsByName(app.Flags))
|
||||||
sort.Sort(cli.CommandsByName(app.Commands))
|
sort.Sort(cli.CommandsByName(app.Commands))
|
||||||
app.Before = func(ctx *cli.Context) error {
|
app.Before = func(ctx *cli.Context) error {
|
||||||
|
|
@ -158,8 +153,15 @@ func main() {
|
||||||
err := app.Run(os.Args)
|
err := app.Run(os.Args)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(err.Error())
|
log.Error(err.Error())
|
||||||
|
|
||||||
|
// wait for metrics reporter to push latest measurements
|
||||||
|
time.Sleep(collectionInterval + 1*time.Second)
|
||||||
|
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// wait for metrics reporter to push latest measurements
|
||||||
|
time.Sleep(collectionInterval + 1*time.Second)
|
||||||
}
|
}
|
||||||
|
|
||||||
func setupMetrics(ctx *cli.Context) {
|
func setupMetrics(ctx *cli.Context) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue