From 106366c7180ed6429a39d16527a86d9c65303436 Mon Sep 17 00:00:00 2001 From: janw Date: Mon, 16 Jun 2008 17:00:14 +0000 Subject: [PATCH] Modified Signal Handler for SIGUSR2 - recreate all needed DBs. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11342 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-server | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 262d1afd1..6d2c866d8 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -1459,7 +1459,7 @@ sub session_start { $kernel->yield('create_fai_release_db', $fai_release_tn ); $kernel->yield('watch_for_next_tasks'); $kernel->sig(USR1 => "sig_handler"); - $kernel->sig(USR2 => "create_packages_list_db"); + $kernel->sig(USR2 => "recreate_packages_db"); $kernel->delay_set('watch_for_new_jobs', $job_queue_loop_delay); $kernel->delay_set('watch_for_done_jobs', $job_queue_loop_delay); $kernel->delay_set('watch_for_new_messages', $messaging_db_loop_delay); @@ -2002,6 +2002,16 @@ sub change_goto_state { } +sub run_recreate_packages_db { + my ($kernel, $session, $heap) = @_[KERNEL, SESSION, HEAP]; + my $session_id = $session->ID; + &main::daemon_log("$session_id INFO: Recreating FAI Packages DB ('$fai_release_tn', '$fai_server_tn', '$packages_list_tn')", 4); + $kernel->yield('create_fai_release_db'); + $kernel->yield('create_fai_server_db'); + return; +} + + sub run_create_fai_server_db { my ($kernel, $session, $heap, $table_name) = @_[KERNEL, SESSION, HEAP, ARG0]; my $session_id = $session->ID; @@ -3030,6 +3040,7 @@ POE::Session->create( create_packages_list_db => \&run_create_packages_list_db, create_fai_server_db => \&run_create_fai_server_db, create_fai_release_db => \&run_create_fai_release_db, + recreate_packages_db => \&run_recreate_packages_db, session_run_result => \&session_run_result, session_run_debug => \&session_run_debug, session_run_done => \&session_run_done, -- 2.30.2