diff --git a/cmd/collect.go b/cmd/collect.go index 2a7d0d4..bc58293 100644 --- a/cmd/collect.go +++ b/cmd/collect.go @@ -25,6 +25,9 @@ var collectCmd = &cobra.Command{ l.Log.Errorf("could not get states: %v", err) } + if threads <= 0 { + threads = mathutil.Clamp(len(probeStates), 1, 255) + } q := &magellan.QueryParams{ User: user, Pass: pass, @@ -34,11 +37,6 @@ var collectCmd = &cobra.Command{ Verbose: verbose, WithSecureTLS: withSecureTLS, } - - // scan and store probe data in dbPath - if threads <= 0 { - threads = mathutil.Clamp(len(probeStates), 1, 255) - } magellan.CollectInfo(&probeStates, l, q) // generate custom xnames for bmcs