mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 08:14:04 +02:00
ConfigJob: add configForLatestActivityExists()
This commit is contained in:
parent
734c7c7b02
commit
bafc53e7a2
@ -52,9 +52,18 @@ class ConfigJob extends JobHook
|
|||||||
|
|
||||||
protected function shouldGenerate()
|
protected function shouldGenerate()
|
||||||
{
|
{
|
||||||
return $this->getSetting('force_generate')
|
return $this->getSetting('force_generate') === 'y'
|
||||||
// -> last config?!
|
|| ! $this->configForLatestActivityExists();
|
||||||
|| $this->db()->countActivitiesSinceLastDeployedConfig() > 0;
|
}
|
||||||
|
|
||||||
|
protected function configForLatestActivityExists()
|
||||||
|
{
|
||||||
|
$db = $this->db();
|
||||||
|
|
||||||
|
return IcingaConfig::exists(
|
||||||
|
DirectorDeploymentLog::loadLatest($db)->getConfigHexChecksum(),
|
||||||
|
$db
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function shouldDeploy(IcingaConfig $config)
|
protected function shouldDeploy(IcingaConfig $config)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user