Sha256: e2f2bdb65ac058a516b8107fa8672811ffea57ca3e7babffdde449fe2f90fcb0

Contents?: true

Size: 766 Bytes

Versions: 7

Compression:

Stored size: 766 Bytes

Contents

module PoolParty
  module Messenger
    
    # TODO: Fix cookie setting
    def self.erl_command(hostname, extra="")
      command_line_opts = "-pa #{append_dir}/ebin -kernel inet_dist_listen_min 7000 inet_dist_listen_max 7050 -sname #{hostname} -setcookie poolparty"
      
      "erl #{command_line_opts} #{extra} 2>&1 &"
    end
    
    def self.append_dir
      ::File.join( ::File.dirname(__FILE__), "..", "..", "erlang/messenger" )
    end
    
    def messenger_send!(cmd="", testing=false)
      cmd = Messenger.erl_command("client", "-rsh ssh -noshell -run pm_client #{cmd} -s erlang halt")
      testing ? cmd : Kernel.system(cmd)
    end
    
  end
end

module PoolParty
  module Cloud
    class Cloud
      include PoolParty::Messenger
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
auser-poolparty-0.2.20 lib/poolparty/helpers/messenger.rb
auser-poolparty-0.2.21 lib/poolparty/helpers/messenger.rb
auser-poolparty-0.2.22 lib/poolparty/helpers/messenger.rb
auser-poolparty-0.2.23 lib/poolparty/helpers/messenger.rb
auser-poolparty-0.2.24 lib/poolparty/helpers/messenger.rb
auser-poolparty-0.2.25 lib/poolparty/helpers/messenger.rb
auser-poolparty-0.2.26 lib/poolparty/helpers/messenger.rb