Class: Aspera::Agent::Base
- Inherits:
-
Object
- Object
- Aspera::Agent::Base
- Defined in:
- lib/aspera/agent/base.rb
Overview
Base class for transfer agents Transfer agents provide methods:
-
‘start_transfer` : take a transfer spec and start a transfer asynchronously
-
‘wait_for_transfers_completion` : waits for all transfer sessions to finish
-
‘notify_progress` : called back by transfer agent to notify transfer progress
Instance Method Summary collapse
-
#wait_for_completion ⇒ Object
Wait for all sessions to terminate and return the status of each session.
Instance Method Details
#wait_for_completion ⇒ Object
Wait for all sessions to terminate and return the status of each session
13 14 15 16 17 18 19 20 |
# File 'lib/aspera/agent/base.rb', line 13 def wait_for_completion # list of: :success or "error message string" statuses = wait_for_transfers_completion @progress&.reset Aspera.assert_type(statuses, Array) Aspera.assert(statuses.none?{ |i| !i.eql?(:success) && !i.is_a?(StandardError)}){"bad statuses content: #{statuses}"} return statuses end |