From 0531aa655585d718300577e743714d8b1b9843de Mon Sep 17 00:00:00 2001 From: rettenbe Date: Mon, 27 Oct 2008 16:38:53 +0000 Subject: [PATCH] * 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 --- gosa-si/server/events/clMessages.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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); -- 2.30.2