lib/cloudstack-cli/helper.rb in cloudstack-cli-1.5.7 vs lib/cloudstack-cli/helper.rb in cloudstack-cli-1.5.8

- old
+ new

@@ -13,11 +13,12 @@ ASYNC_STATES = { -1 => "waiting", 0 => "running", 1 => "completed", - 2 => "error" + 2 => "error", + 3 => "aborted" } def watch_jobs(jobs) chars = %w(| / - \\) call = 0 @@ -118,10 +119,10 @@ print "#{job[:name]} : job #{ASYNC_STATES[job[:status]]} " puts job[:status] == 0 ? spinner.first : "" end t_elapsed = opts[:t_start] ? (Time.now - opts[:t_start]).round(1) : 0 completed = jobs.select{|j| j[:status] == 1}.size - say "Completed: #{completed}/#{jobs.size} (#{t_elapsed}s)", :magenta + say "Completed: #{completed} of #{jobs.size} (#{t_elapsed}s)", :magenta sleep opts[:sleeptime] || 0.1 spinner.push spinner.shift spinner end