summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 083c932)
raw | patch | inline | side by side (parent: 083c932)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 15 Apr 2008 08:19:05 +0000 (08:19 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 15 Apr 2008 08:19:05 +0000 (08:19 +0000) |
Added option to create_fai_server_db to not create packages list if wanted.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10446 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10446 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-server | patch | blob | history | |
gosa-si/server/events/gosaTriggered.pm | patch | blob | history |
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index cb243deff3879981da39f477314cdf26463fae52..8a69ca4182244fd9eb8711f2ad255f24177d5462 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
sub create_fai_server_db {
- my ($table_name, $kernel) = @_;
+ my ($table_name, $kernel, $dont_create_packages_list) = @_;
my $result;
my $ldap_handle = &get_ldap_handle();
if(defined($ldap_handle)) {
daemon_log("INFO: create_fai_server_db: finished", 5);
# TODO: Find a way to post the 'create_packages_list_db' event
- &create_packages_list_db($ldap_handle);
+ if(!defined($dont_create_packages_list)) {
+ &create_packages_list_db($ldap_handle);
+ }
}
$ldap_handle->disconnect;
$ldap_handle->disconnect;
return $result;
}
+
+
sub run_create_fai_release_db {
my ($session, $heap, $table_name) = @_[SESSION, HEAP, ARG0];
my $task = POE::Wheel::Run->new(
index 29e1a7b9ea2cc1f96d4e9e98f857a81ba5eed27e..d1c1cdf9e7e7bdd2f1a73a48b02189798721e0e1 100644 (file)
"trigger_action_rescan",
"trigger_action_wake",
"recreate_fai_server_db",
+ "recreate_fai_release_db",
"send_user_msg",
"get_available_kernel",
);
}
$main::fai_server_db->create_table("new_fai_server", \@main::fai_server_col_names);
- &main::create_fai_server_db("new_fai_server");
+ &main::create_fai_server_db("new_fai_server",undef,"dont");
$main::fai_server_db->move_table("new_fai_server", $main::fai_server_tn);
my @out_msg_l = ( $out_msg );
}
+sub recreate_fai_release_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::fai_server_db->create_table("new_fai_release", \@main::fai_release_col_names);
+ &main::create_fai_release_db("new_fai_release");
+ $main::fai_server_db->move_table("new_fai_release", $main::fai_release_tn);
+
+ 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];