From: rettenbe Date: Tue, 15 Apr 2008 08:59:26 +0000 (+0000) Subject: add session_id at logging for event recreate_fai_release_db X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=603a9e60bceaa4c29cc3b05a96c5e587b1366774;p=gosa.git add session_id at logging for event recreate_fai_release_db git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10447 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 8a69ca418..9bd722dca 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -1656,12 +1656,15 @@ sub run_create_fai_server_db { sub create_fai_release_db { - my ($table_name) = @_; + my ($table_name, $session_id) = @_; my $result; + # used for logging + if (not defined $session_id) { $session_id = "0"; } + my $ldap_handle = &get_ldap_handle(); if(defined($ldap_handle)) { - daemon_log("INFO: create_fai_release_db: start",5); + daemon_log("$session_id INFO: create_fai_release_db: start",5); my $mesg= $ldap_handle->search( base => $ldap_base, scope => 'sub', @@ -1694,14 +1697,14 @@ sub create_fai_release_db { } } } - daemon_log("DEBUG: Inserting ".scalar @sql_list." entries to DB",6); + daemon_log("$session_id DEBUG: Inserting ".scalar @sql_list." entries to DB",6); if(@sql_list) { unshift @sql_list, "DELETE FROM $table_name"; $fai_server_db->exec_statementlist(\@sql_list); } - daemon_log("DEBUG: Done with inserting",6); + daemon_log("$session_id DEBUG: Done with inserting",6); } - daemon_log("INFO: create_fai_release_db: finished",5); + daemon_log("$session_id INFO: create_fai_release_db: finished",5); } $ldap_handle->disconnect; return $result; diff --git a/gosa-si/server/events/gosaTriggered.pm b/gosa-si/server/events/gosaTriggered.pm index d1c1cdf9e..80f793e8d 100644 --- a/gosa-si/server/events/gosaTriggered.pm +++ b/gosa-si/server/events/gosaTriggered.pm @@ -226,7 +226,7 @@ sub recreate_fai_release_db { } $main::fai_server_db->create_table("new_fai_release", \@main::fai_release_col_names); - &main::create_fai_release_db("new_fai_release"); + &main::create_fai_release_db("new_fai_release", $session_id); $main::fai_server_db->move_table("new_fai_release", $main::fai_release_tn); my @out_msg_l = ( $out_msg ); diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php index b3e63b2ac..7609df6a9 100755 --- a/gosa-si/tests/client.php +++ b/gosa-si/tests/client.php @@ -53,7 +53,6 @@ if($sock->connected()){ #$data = "
job_set_activated_for_installation
10.89.1.31:20083 GOSA 00:01:6c:9d:b9:fa22220101000000
"; - # trigger jobs at client #$data = "
gosa_detect_hardware
10.89.1.31:20083 10.89.1.31:20081
"; #$data = "
gosa_new_key_for_client
00:01:6c:9d:b9:fa 10.89.1.31:20081
"; @@ -73,13 +72,14 @@ if($sock->connected()){ # recreate_fai_server_db #$data = "
gosa_recreate_fai_server_db
GOSA GOSA
"; +$data = "
gosa_recreate_fai_release_db
GOSA GOSA
"; ########### # messaging #$data = "
gosa_send_user_msg
GOSA GOSA susi harald susi gosa-admins-all
"; #$data = "
gosa_send_user_msg
GOSA GOSA gosa-admins-all kaffeepause
"; #$data = "
gosa_send_user_msg
GOSA GOSA rettenbe kaffeepause
"; -$data = "
gosa_send_user_msg
GOSA GOSA eine wichtige nachricht me you 20130101235959 kaffeepause
"; +#$data = "
gosa_send_user_msg
GOSA GOSA eine wichtige nachricht me you 20130101235959 kaffeepause
"; ################ @@ -97,7 +97,6 @@ $data = "
gosa_send_user_msg
GOSA write($data); $answer = "nothing"; $answer = $sock->read();