mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 01:04:12 +02:00
ConfigJob: fix dealing with currently active config
This commit is contained in:
parent
a761bb108b
commit
6665d6d80f
@ -29,6 +29,8 @@ class ConfigJob extends JobHook
|
||||
if ($this->shouldDeploy($config)) {
|
||||
$this->deploy($config);
|
||||
}
|
||||
|
||||
$this->clearLastDeployment();
|
||||
}
|
||||
|
||||
protected function api()
|
||||
@ -83,7 +85,7 @@ class ConfigJob extends JobHook
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->getActiveChecksum() === $config->getChecksum()) {
|
||||
if ($this->getActiveChecksum() === $config->getHexChecksum()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -94,7 +96,6 @@ class ConfigJob extends JobHook
|
||||
|
||||
protected function deploy(IcingaConfig $config)
|
||||
{
|
||||
$this->clearLastDeployment();
|
||||
$db = $this->db();
|
||||
$api = $this->api();
|
||||
$api->wipeInactiveStages($db);
|
||||
|
@ -76,10 +76,7 @@ class DirectorDeploymentLog extends DbObject
|
||||
$db = $connection->getDbAdapter();
|
||||
$query = $db->select()
|
||||
->from('director_deployment_log', array('c' => $connection->dbHexFunc('config_checksum')))
|
||||
->where('stage_name = ?')
|
||||
->where('stage_collected IS NULL')
|
||||
->where('startup_succeeded IS NULL')
|
||||
->order('stage_name');
|
||||
->where('stage_name = ?');
|
||||
|
||||
return $db->fetchOne($query, $stage);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user