Sha256: 50e6e83cd0487310f89aac4de9cd17c1ac4a3c111ccbf26b5c91c3260af2200e
Contents?: true
Size: 1.43 KB
Versions: 1
Compression:
Stored size: 1.43 KB
Contents
require 'rubygems' require "pp" require File.join(File.dirname(__FILE__),'remote_lmp.rb') require File.join(File.dirname(__FILE__),'utils.rb') begin require 'sinatra/base' require "memcache" require "log4r" include Log4r require 'activesupport' unless ({}.respond_to? :to_json) rescue LoadError => e p <<DOC ----------------------------------------------------------------------- LPM say: The LPM server require sinatra and activesupport. Please exec "gem install sinatra" or "gem install activesupport" first. "gem install memcache" or "gem install log4r" as well. ----------------------------------------------------------------------- Ruby say: #{e} ----------------------------------------------------------------------- DOC exit(-1) end $Log = Logger.new File.join(File.dirname(__FILE__),'log','lpmp2nd.log') File.open( File.join(File.dirname(__FILE__),'config','log.yaml') ) { |yf| $Log.level = YAML::load( yf ) } =begin rdoc caichen = Caichen.new(...) caichenAgentPids = [] caichen.HostClientObjs.each do |ip,obj| caichenAgentPids << Process.fork do # @ip = options[:xiaoqian_ip] || options[:ip] # @procAgent = options[:procAgent] # @processAgent = options[:processAgent] # @cache = options[:cache] caichenagent = CaichenAgent.new({:ip=>ip,:procAgent=>obj[:proc],:processAgent=>ojb[:process],:cache=>caichen.cache}) caichenagent.work_job end Process.detach caichenAgentPids[-1] end =end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lpmp-1.0.0 | lib/bg_pull/lpmp.rb |