summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3728c5b)
raw | patch | inline | side by side (parent: 3728c5b)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 Apr 2008 09:16:03 +0000 (09:16 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 Apr 2008 09:16:03 +0000 (09:16 +0000) |
* jobdb_id was set in all sql statements as a string, now its an integer
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10637 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10637 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 b2dff82b4bb49d06a5e8171260ef6cd6aef5e527..2fbc8be721324cb6ff7373f5df620ca0079306a4 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
if (not $answer =~ /<header>trigger_action_reinstall<\/header>/) {
my $sql_statement = "UPDATE $job_queue_tn ".
"SET status='error', result='can not deliver msg, please consult log file' ".
- "WHERE id='$jobdb_id'";
+ "WHERE id=$jobdb_id";
my $res = $job_db->update_dbentry($sql_statement);
}
} else {
my $sql_statement = "UPDATE $job_queue_tn ".
"SET status='done' ".
- "WHERE id='$jobdb_id' AND status='processed'";
+ "WHERE id=$jobdb_id AND status='processed'";
my $res = $job_db->update_dbentry($sql_statement);
}
}
while( my ($id, $hit) = each %{$res} ) {
my $jobdb_id = $hit->{id};
- my $sql_statement = "DELETE FROM $job_queue_tn WHERE id='$jobdb_id'";
- my $res = $job_db->del_dbentry($sql_statement);
+ my $sql_statement = "DELETE FROM $job_queue_tn WHERE id=$jobdb_id";
+ my $res = $job_db->del_dbentry($sql_statement);
}
$kernel->delay_set('watch_for_done_jobs',$job_queue_loop_delay);
my $sql_statement = "SELECT * FROM $job_queue_tn WHERE macaddress LIKE '$macaddress' AND headertag='$jobdb_headertag' AND status='processing'";
my $res = $job_db->exec_statement( $sql_statement );
foreach my $hit (@{$res}) {
- push @drops, "DELETE FROM $job_queue_tn WHERE id = '$jobdb_id'";
+ push @drops, "DELETE FROM $job_queue_tn WHERE id=$jobdb_id";
}
} else {
daemon_log("J ERROR: Job without id exists for macaddress $macaddress!", 1);
my $func_error = &send_msg_to_target($job_msg, $server_address, $GosaPackages_key, $header, "J");
# update status in job queue to 'processing'
- $sql_statement = "UPDATE $job_queue_tn SET status='processing' WHERE id='$jobdb_id'";
+ $sql_statement = "UPDATE $job_queue_tn SET status='processing' WHERE id=$jobdb_id";
my $res = $job_db->update_dbentry($sql_statement);
+# TODO: abfangen ob alles in ordnung ist oder nicht, wenn nicht error schmeißen
# We don't want parallel processing
last;
index b84d8207c31adb80e7501bfa0205b69565ae2b3c..4fba9bec67fe6a5eafa37c7f5005c71f2ae62837 100644 (file)
# keep job queue uptodate if necessary
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'";
+ 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);
}
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'";
+ 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);
}
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'";
+ 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);
}
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'";
+ 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);
}
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'";
+ 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);
}
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'";
+ 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);
}
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'";
+ 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);
}
my $out_msg = $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'";
+ 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);
}
my $target = @{$msg_hash->{target}}[0];
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'";
+ 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);
}
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'";
+ 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);
}
# update status of job
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'";
+ 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::change_goto_state('locked', \@{$msg_hash->{target}}, $session_id);
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'";
+ 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::change_goto_state('active', \@{$msg_hash->{target}}, $session_id);
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'";
+ 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::change_fai_state('localboot', \@{$msg_hash->{target}}, $session_id);
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'";
+ 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::change_fai_state('halt', \@{$msg_hash->{target}}, $session_id);
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'";
+ 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::change_fai_state('reboot', \@{$msg_hash->{target}}, $session_id);
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'";
+ 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::change_fai_state('memcheck', \@{$msg_hash->{target}}, $session_id);
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'";
+ 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);
}
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'";
+ 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::change_fai_state('sysinfo', \@{$msg_hash->{target}}, $session_id);
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'";
+ 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);
}
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'";
+ 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);
}
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'";
+ 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);
}
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'";
+ 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);
}