mirror of https://github.com/Icinga/icinga2.git
RedisWriter: Use IcingaApplication environment
This commit is contained in:
parent
c5b0884e44
commit
a6ec60a992
|
@ -77,11 +77,9 @@ String RedisWriter::FormatCommandLine(const Value& commandLine)
|
|||
return result;
|
||||
}
|
||||
|
||||
static Value l_DefaultEnv = "production";
|
||||
|
||||
String RedisWriter::GetEnvironment()
|
||||
{
|
||||
return ScriptGlobal::Get("Environment", &l_DefaultEnv);
|
||||
return ConfigType::GetObjectsByType<IcingaApplication>()[0]->GetEnvironment();
|
||||
}
|
||||
|
||||
String RedisWriter::GetObjectIdentifier(const ConfigObject::Ptr& object)
|
||||
|
|
Loading…
Reference in New Issue