mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
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…
x
Reference in New Issue
Block a user