mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-12-26 15:29:04 +01:00
Fix for --once option
This commit is contained in:
parent
9886f14d14
commit
0623691bab
@ -291,7 +291,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.2 * float64(rcfg.Interval)
|
x := 1.2 * float64(rcfg.Interval.Seconds())
|
||||||
time.Sleep(time.Duration(int(x)) * time.Second)
|
time.Sleep(time.Duration(int(x)) * time.Second)
|
||||||
shutdownSignal <- os.Interrupt
|
shutdownSignal <- os.Interrupt
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user