summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: edce688)
raw | patch | inline | side by side (parent: edce688)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 17 Mar 2008 10:33:35 +0000 (10:33 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 17 Mar 2008 10:33:35 +0000 (10:33 +0000) |
-Only add triggeredd events, if not already in process
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9894 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9894 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/systems/admin/systems/class_systemManagement.inc | patch | blob | history |
diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc
index f56c0b574001d2e5259f207f0990d78599f92e5b..6283f5c1b9976e9a7617cf58609e542304fa1ad1 100644 (file)
}
$events = DaemonEvent::get_event_types(SYSTEM_EVENT);
$type = preg_replace("/^[a-z]*_event_/","",$s_action);
+ $o_queue = new gosaSupportDaemon();
+
+ /* Skip installation or update trigerred events,
+ * if this entry is currently processing.
+ */
+ if(preg_match("/trigger_event/",$s_action) && in_array($type,array("DaemonEvent_reinstall","DaemonEvent_update"))){
+ foreach($mac as $key => $mac_address){
+ foreach($o_queue->get_entries_by_mac(array($mac_address)) as $entry){
+
+ $entry['STATUS'] = strtoupper($entry['STATUS']);
+ if($entry['STATUS'] == "PROCESSING" &&
+ isset($events['QUEUED'][$entry['HEADERTAG']]) &&
+ in_array($events['QUEUED'][$entry['HEADERTAG']],array("DaemonEvent_reinstall","DaemonEvent_update"))){
+ unset($mac[$key]);
+
+ new log("security","systems/".get_class($this),"",array(),"Skip adding 'DaemonEvent::".$type."' for mac '".$mac_address."', there is already a job in progress.");
+ break;
+ }
+ }
+ }
+ }
/* Prepare event to be added
*/