Sha256: 6dcae43906b340718a60b0000da0b634c70390caf40036ad794fe39b277e270a

Contents?: true

Size: 632 Bytes

Versions: 13

Compression:

Stored size: 632 Bytes

Contents

require "ping"

module PoolParty
  module Remote
    
    # # Are too few instances running?
    def are_too_few_instances_running?
      nodes(:status => "running").size < minimum_instances.to_i
    end
    # # Are there more instances than allowed?
    def are_too_many_instances_running?
      nodes(:status => "running").size > maximum_instances.to_i
    end

    def list_of_nodes_exceeding_minimum_runtime
      nodes(:status => "running").reject{|i| i.elapsed_runtime < minimum_runtime}
    end
    
    def are_any_nodes_exceeding_minimum_runtime?
      !list_of_nodes_exceeding_minimum_runtime.blank?
    end
    
  end
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
auser-poolparty-1.2.0 lib/poolparty/net/remoter/cloud_control.rb
auser-poolparty-1.2.1 lib/poolparty/net/remoter/cloud_control.rb
auser-poolparty-1.2.10 lib/poolparty/net/remoter/cloud_control.rb
auser-poolparty-1.2.11 lib/poolparty/net/remoter/cloud_control.rb
auser-poolparty-1.2.12 lib/poolparty/net/remoter/cloud_control.rb
auser-poolparty-1.2.2 lib/poolparty/net/remoter/cloud_control.rb
auser-poolparty-1.2.3 lib/poolparty/net/remoter/cloud_control.rb
auser-poolparty-1.2.4 lib/poolparty/net/remoter/cloud_control.rb
auser-poolparty-1.2.7 lib/poolparty/net/remoter/cloud_control.rb
auser-poolparty-1.2.8 lib/poolparty/net/remoter/cloud_control.rb
auser-poolparty-1.2.9 lib/poolparty/net/remoter/cloud_control.rb
fairchild-poolparty-1.2.12 lib/poolparty/net/remoter/cloud_control.rb
poolparty-1.2.2 lib/poolparty/net/remoter/cloud_control.rb