mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2025-04-08 22:45:55 +02:00
Fix for --once option
This commit is contained in:
parent
1ed4e70fb9
commit
7087edd5af
@ -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…
x
Reference in New Issue
Block a user