Code

Added event recreate_packages_list_db.
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Apr 2008 09:16:19 +0000 (09:16 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Apr 2008 09:16:19 +0000 (09:16 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10611 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/server/events/gosaTriggered.pm

index bb4828eea566963e833bacfcb49c4807b394bbb6..85006750acbcc88948a60fbeb3648a8d0a062662 100644 (file)
@@ -29,6 +29,7 @@ my @events = (
     "trigger_action_wake",
     "recreate_fai_server_db",
     "recreate_fai_release_db",
+    "recreate_packages_list_db",
     "send_user_msg", 
        "get_available_kernel",
     );
@@ -243,6 +244,24 @@ sub recreate_fai_release_db {
 }
 
 
+sub recreate_packages_list_db {
+       my ($msg, $msg_hash, $session_id) = @_ ;
+       my $out_msg;
+
+       my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
+       if( defined $jobdb_id) {
+               my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id='$jobdb_id'";
+               &main::daemon_log("$session_id DEBUG: $sql_statement", 7);
+               my $res = $main::job_db->exec_statement($sql_statement);
+       }
+
+       &main::create_packages_list_db;
+
+       my @out_msg_l = ( $out_msg );
+       return @out_msg_l;
+}
+
+
 sub get_login_usr_for_client {
     my ($msg, $msg_hash, $session_id) = @_ ;
     my $header = @{$msg_hash->{'header'}}[0];