sundbp
3/9/2012 - 6:38 PM

The config as DSL

The config as DSL

TorqueBox.configure do  
  
  ruby do  
    version "1.9"  
  end  
  
  environment do  
    RACK_ENV 'production'  
  end  
  
  web do  
    context "/"  
  end  
  
  service CdrSvcBroker do  
    config do  
      endpoint 'tcp://*:5555'  
    end  
  end  
  
  service TptMdsWorker do  
    config do  
      broker_endpoint 'tcp://127.0.0.1:5555'  
      db_user 'xxxx'  
      db_password 'xxxx'  
    end  
  end  
  
  service GapWorker do  
    config do  
      broker_endpoint 'tcp://127.0.0.1:5555'  
      num_threads 1  
    end  
  end  
  
end