From: rettenbe Date: Mon, 27 Oct 2008 16:38:53 +0000 (+0000) Subject: * change clMessages handling to avoid job status race conditions X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0531aa655585d718300577e743714d8b1b9843de;p=gosa.git * change clMessages handling to avoid job status race conditions * TASKBEGIN finish -> done * TASKBEGIN faiend -> done * TASKBEGIN savelog -> done * TASKEND savelog 0 -> done * GOTOACTIVATION -> processing * TASKBEGIN "all other" -> processing git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12787 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/server/events/clMessages.pm b/gosa-si/server/events/clMessages.pm index 47bb47c63..0e9c69b96 100644 --- a/gosa-si/server/events/clMessages.pm +++ b/gosa-si/server/events/clMessages.pm @@ -444,7 +444,7 @@ sub FAIREBOOT { $header =~ s/CLMSG_//g; my $sql_statement = "UPDATE $main::job_queue_tn ". - "SET status='processing', result='$header "."$content', modified='1' ". + "SET result='$header "."$content', modified='1' ". "WHERE status='processing' AND macaddress LIKE '$macaddress'"; &main::daemon_log("$session_id DEBUG: $sql_statement", 7); my $res = $main::job_db->update_dbentry($sql_statement); @@ -473,7 +473,7 @@ sub TASKSKIP { $header =~ s/CLMSG_//g; my $sql_statement = "UPDATE $main::job_queue_tn ". - "SET status='processing', result='$header "."$content', modified='1' ". + "SET result='$header "."$content', modified='1' ". "WHERE status='processing' AND macaddress LIKE '$macaddress'"; &main::daemon_log("$session_id DEBUG: $sql_statement", 7); my $res = $main::job_db->update_dbentry($sql_statement); @@ -641,7 +641,7 @@ sub TASKEND { } else { my $sql_statement = "UPDATE $main::job_queue_tn ". - "SET status='processing', result='$header "."$content', modified='1' ". + "SET result='$header "."$content', modified='1' ". "WHERE status='processing' AND macaddress LIKE '$macaddress'"; &main::daemon_log("$session_id DEBUG: $sql_statement", 7); my $res = $main::job_db->update_dbentry($sql_statement); @@ -674,7 +674,7 @@ sub TASKERROR { &main::change_fai_state('error', \@{$msg_hash->{'macaddress'}}, $session_id); my $sql_statement = "UPDATE $main::job_queue_tn ". - "SET status='processing', result='$header "."$content', modified='1' ". + "SET result='$header "."$content', modified='1' ". "WHERE status='processing' AND macaddress LIKE '$macaddress'"; &main::daemon_log("$session_id DEBUG: $sql_statement", 7); my $res = $main::job_db->update_dbentry($sql_statement); @@ -703,7 +703,7 @@ sub HOOK { if(not ref($content) eq "STRING") { $content = ""; } my $sql_statement = "UPDATE $main::job_queue_tn ". - "SET status='processing', result='$header "."$content', modified='1' ". + "SET result='$header "."$content', modified='1' ". "WHERE status='processing' AND macaddress LIKE '$macaddress'"; &main::daemon_log("$session_id DEBUG: $sql_statement", 7); my $res = $main::job_db->update_dbentry($sql_statement);