Added dev env to RabbitMQ stuff for Analyzer (fixed)

This commit is contained in:
Albert Santoni 2014-04-22 12:28:20 -04:00
parent a79f53758f
commit 43483dc112
2 changed files with 4 additions and 3 deletions

View File

@ -35,6 +35,7 @@ class Config {
$CC_CONFIG['baseUrl'] = $values['general']['base_url'];
$CC_CONFIG['basePort'] = $values['general']['base_port'];
$CC_CONFIG['phpDir'] = $values['general']['airtime_dir'];
$CC_CONFIG['dev_env'] = $values['general']['dev_env'];
$CC_CONFIG['cache_ahead_hours'] = $values['general']['cache_ahead_hours'];

View File

@ -86,8 +86,8 @@ class Application_Model_RabbitMq
//and shared between all instances on Airtime Pro.
$CC_CONFIG = Config::getConfig();
$devEnv = "production"; //Default
if (array_key_exists("dev_env", $CC_CONFIG["general"])) {
$devEnv = $CC_CONFIG["general"]["dev_env"];
if (array_key_exists("dev_env", $CC_CONFIG)) {
$devEnv = $CC_CONFIG["dev_env"];
}
$config = parse_ini_file("/etc/airtime-saas/rabbitmq-analyzer-" . $devEnv . ".ini", true);
$conn = new AMQPConnection($config["rabbitmq"]["host"],