mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 08:14:04 +02:00
Db: add countActivitiesSinceLastDeployedConfig
Forgot to push this one, sorry.
This commit is contained in:
parent
9b8415cccd
commit
ea8da2172f
@ -24,6 +24,19 @@ class Db extends DbConnection
|
|||||||
return $this->getDbAdapter();
|
return $this->getDbAdapter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function countActivitiesSinceLastDeployedConfig()
|
||||||
|
{
|
||||||
|
$query = 'SELECT COUNT(*) FROM director_activity_log WHERE id > ('
|
||||||
|
. ' SELECT id FROM director_activity_log WHERE checksum = ('
|
||||||
|
. ' SELECT last_activity_checksum FROM director_generated_config WHERE checksum = ('
|
||||||
|
. ' SELECT config_checksum FROM director_deployment_log ORDER by id desc limit 1'
|
||||||
|
. ' )'
|
||||||
|
. ' )'
|
||||||
|
. ')';
|
||||||
|
|
||||||
|
return (int) $this->db()->fetchOne($query);
|
||||||
|
}
|
||||||
|
|
||||||
public function getMasterZoneName()
|
public function getMasterZoneName()
|
||||||
{
|
{
|
||||||
return $this->getSetting('master_zone', 'master');
|
return $this->getSetting('master_zone', 'master');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user