[icinga-checkins] icinga.org: icingaweb2-module-director/feature-ddo-playground: StateList: load existing objects on construct

git at icinga.org git at icinga.org
Tue Jun 21 15:44:58 CEST 2016


Module: icingaweb2-module-director
Branch: feature-ddo-playground
Commit: a67ed5dc71454e8b5e91db5c22bda72b286768e0
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=a67ed5dc71454e8b5e91db5c22bda72b286768e0

Author: Thomas Gelf <thomas at gelf.net>
Date:   Tue Jun 21 15:42:09 2016 +0200

StateList: load existing objects on construct

---

 library/Director/Ddo/StateList.php |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/library/Director/Ddo/StateList.php b/library/Director/Ddo/StateList.php
index b9a8b7a..b237eb8 100644
--- a/library/Director/Ddo/StateList.php
+++ b/library/Director/Ddo/StateList.php
@@ -14,6 +14,10 @@ class StateList
     {
         $this->connection = $connection;
         $this->db = $connection->getDbAdapter();
+        $this->objects = array_merge(
+            HostState::loadAll($this->connection, null, 'checksum'),
+            ServiceState::loadAll($this->connection, null, 'checksum')
+        );
     }
 
     public function processCheckResult($result)



More information about the icinga-checkins mailing list