Sha256: 7aa205280620f3cfba31f28478d78f9926678d692d9c179b129b80481f94fbc3
Contents?: true
Size: 605 Bytes
Versions: 7
Compression:
Stored size: 605 Bytes
Contents
module HaveAPI::CLI::Commands class ActionStateWait < HaveAPI::CLI::Command cmd :action_state, :wait args '<STATE ID>' desc 'Block until the action is finished' def exec(args) if args.size < 1 warn "Provide argument STATE ID" exit(false) end @api.set_opts(block: false) state = HaveAPI::CLI::ActionState.new( @global_opts, @api, args.first.to_i ) ret = state.wait_for_completion(timeout: @global_opts[:timeout]) if ret.nil? warn "Timeout" exit(false) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems