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
f7b0db6563
commit
f6cd8232fb
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.CommandsByName(app.Commands))
|
||||
app.Before = func(ctx *cli.Context) error {
|
||||
|
|
@ -158,8 +153,15 @@ func main() {
|
|||
err := app.Run(os.Args)
|
||||
if err != nil {
|
||||
log.Error(err.Error())
|
||||
|
||||
// wait for metrics reporter to push latest measurements
|
||||
time.Sleep(collectionInterval + 1*time.Second)
|
||||
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// wait for metrics reporter to push latest measurements
|
||||
time.Sleep(collectionInterval + 1*time.Second)
|
||||
}
|
||||
|
||||
func setupMetrics(ctx *cli.Context) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue