mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-12-25 23:19:06 +01:00
Don't wait too long in case of --once
This commit is contained in:
parent
2925ad9f40
commit
7f77cad056
@ -286,7 +286,7 @@ func mainFunc() int {
|
|||||||
|
|
||||||
// Wait until one tick has passed. This is a workaround
|
// Wait until one tick has passed. This is a workaround
|
||||||
if rcfg.CliArgs["once"] == "true" {
|
if rcfg.CliArgs["once"] == "true" {
|
||||||
x := 1.8 * float64(rcfg.ConfigFile.Interval)
|
x := 1.2 * float64(rcfg.ConfigFile.Interval)
|
||||||
time.Sleep(time.Duration(int(x)) * time.Second)
|
time.Sleep(time.Duration(int(x)) * time.Second)
|
||||||
shutdown(&rcfg)
|
shutdown(&rcfg)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user