mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 08:14:04 +02:00
SyncRule: provide current runId
This commit is contained in:
parent
b4e0bb0a93
commit
a9b7861473
@ -30,6 +30,8 @@ class SyncRule extends DbObject
|
|||||||
|
|
||||||
private $sync;
|
private $sync;
|
||||||
|
|
||||||
|
private $currentSyncRunId;
|
||||||
|
|
||||||
private $filter;
|
private $filter;
|
||||||
|
|
||||||
public function listInvolvedSourceIds()
|
public function listInvolvedSourceIds()
|
||||||
@ -119,9 +121,10 @@ class SyncRule extends DbObject
|
|||||||
if ($sync->hasModifications()) {
|
if ($sync->hasModifications()) {
|
||||||
Benchmark::measure('Got modifications for sync rule ' . $this->rule_name);
|
Benchmark::measure('Got modifications for sync rule ' . $this->rule_name);
|
||||||
$this->sync_state = 'pending-changes';
|
$this->sync_state = 'pending-changes';
|
||||||
if ($apply && $sync->apply()) {
|
if ($apply && $runId = $sync->apply()) {
|
||||||
Benchmark::measure('Successfully synced rule ' . $this->rule_name);
|
Benchmark::measure('Successfully synced rule ' . $this->rule_name);
|
||||||
$this->sync_state = 'in-sync';
|
$this->sync_state = 'in-sync';
|
||||||
|
$this->currentSyncRunId = $runId;
|
||||||
}
|
}
|
||||||
|
|
||||||
$hadChanges = true;
|
$hadChanges = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user