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()
|
||||
{
|
||||
return $this->getSetting('force_generate')
|
||||
// -> last config?!
|
||||
|| $this->db()->countActivitiesSinceLastDeployedConfig() > 0;
|
||||
return $this->getSetting('force_generate') === 'y'
|
||||
|| ! $this->configForLatestActivityExists();
|
||||
}
|
||||
|
||||
protected function configForLatestActivityExists()
|
||||
{
|
||||
$db = $this->db();
|
||||
|
||||
return IcingaConfig::exists(
|
||||
DirectorDeploymentLog::loadLatest($db)->getConfigHexChecksum(),
|
||||
$db
|
||||
);
|
||||
}
|
||||
|
||||
protected function shouldDeploy(IcingaConfig $config)
|
||||
|
Loading…
x
Reference in New Issue
Block a user