From: janw Date: Tue, 22 Apr 2008 09:16:19 +0000 (+0000) Subject: Added event recreate_packages_list_db. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f007c3900411e6f4317d2383a87f22263b1d5be4;p=gosa.git Added event recreate_packages_list_db. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10611 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/server/events/gosaTriggered.pm b/gosa-si/server/events/gosaTriggered.pm index bb4828eea..85006750a 100644 --- a/gosa-si/server/events/gosaTriggered.pm +++ b/gosa-si/server/events/gosaTriggered.pm @@ -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];