Sha256: 23f5fcdbe1f6a20aff6e4c33bba2e23b0dd8e0996a3757db0214447690374c10
Contents?: true
Size: 781 Bytes
Versions: 16
Compression:
Stored size: 781 Bytes
Contents
class RbVmomi::VIM::Task # Wait for a task to finish. # @return +info.result+ on success. # @raise +info.error+ on error. def wait_for_completion wait_until('info.state') { %w(success error).member? info.state } case info.state when 'success' info.result when 'error' raise info.error end end # Wait for a task to finish, with progress notifications. # @return (see #wait_for_completion) # @raise (see #wait_for_completion) # @yield [info.progress] def wait_for_progress wait_until('info.state', 'info.progress') do yield info.progress if block_given? %w(success error).member? info.state end case info.state when 'success' info.result when 'error' raise info.error end end end
Version data entries
16 entries across 16 versions & 1 rubygems