DirectorDeploymentLog: allow to fetch config...

...checksum for a specific stage name. Implemented getConfigChecksumForStageName
for this.
This commit is contained in:
Thomas Gelf 2016-06-16 14:19:45 +02:00
parent 144b20afc8
commit 3ad56d3a98
1 changed files with 13 additions and 0 deletions

View File

@ -71,6 +71,19 @@ class DirectorDeploymentLog extends DbObject
return (int) $db->fetchOne($query) > 0;
}
public static function getConfigChecksumForStageName(Db $connection, $stage)
{
$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');
return $db->fetchOne($query, $stage);
}
public static function loadLatest(Db $connection)
{
$db = $connection->getDbAdapter();