Sha256: f95b5b5d07130783e1852713be69c474078b2b2f14deff882ae7b17ac03050ee

Contents?: true

Size: 1.47 KB

Versions: 35

Compression:

Stored size: 1.47 KB

Contents

# Copyright (c) 2012 National ICT Australia Limited (NICTA).
# This software may be used and distributed solely under the terms of the MIT license (License).
# You should find a copy of the License in LICENSE.TXT or at http://opensource.org/licenses/MIT.
# By downloading or using this software you accept the terms and the liability disclaimer in the License.

# This OEDL script implements a timeout timer for resources to checked-in an 
# experiment. When it is loaded as part as another experiment, it will wait
# for the specified time in the experiment property 'oedl_timeout'. When that
# wait is over, it checks if all resources defined in the experiment have 
# joined all their groups (also as defined in the experiment). If not, then
# it stops the experiment.
#
# The default timeout value is set here to 120 s. To modify that you should
# set in your experiment the oedl_timeout property to the desired timeout in 
# second. You must do that prior to or as you load this script.
#
# For example, in your OEDL experiment:
#   
#  load_oedl('omf_ec/backward/timeout_resources', { oedl_timeout: 180 })
#
ensureProperty('oedl_timeout',120,'default timeout in second')
info "Waiting for all resources to join... (timeout set to #{property.oedl_timeout} s)"
after property.oedl_timeout.to_i do
 unless all_nodes_up?(OmfEc.experiment.state) 
   info "Waited #{property.oedl_timeout} s for all resources to join, but still some missing! Aborting the experiment execution now!"
   Experiment.done
 end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
omf_ec-6.2.3 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.2.2 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.2.1 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.2.0 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.2.0.pre.2 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.2.0.pre.1 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.1.14.pre.2 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.1.14.pre.1 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.1.12 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.1.11 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.1.10 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.1.9 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.1.9.pre.4 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.1.9.pre.3 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.1.9.pre.2 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.1.8 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.1.7 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.1.6 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.1.6.pre.2 lib/omf_ec/backward/timeout_resources.rb
omf_ec-6.1.6.pre.1 lib/omf_ec/backward/timeout_resources.rb