Code

Add next to the right scope.
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Sep 2008 15:56:26 +0000 (15:56 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Sep 2008 15:56:26 +0000 (15:56 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12407 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/gosa-si-server

index aa8590f954ff932dd183b1bb0c6bb90aae0616e2..99e02fdb491627812c2f21e8471a5d669134226b 100755 (executable)
@@ -1718,16 +1718,16 @@ sub watch_for_new_jobs {
                        # Skip new jobs for host if there is a processing job
                        if(defined($res) and defined @{$res}[0]) {
                                # Prevent race condition if there is a trigger_activate job waiting and a goto-activation job processing
-                               if(@{$res}[5] eq 'goto-activation') {
+                               if(@{$res}[5] eq 'trigger_action_reinstall') {
                                        my $sql_statement_2 =  "SELECT * FROM $job_queue_tn WHERE macaddress LIKE '$macaddress' AND status='waiting' AND headertag = 'trigger_activate_new'"; 
                                        my $res_2 = $job_db->exec_statement( $sql_statement_2 );
                                        if(defined($res_2) and defined @{$res}[0]) {
                                                # Set status from goto-activation to 'waiting' and update timestamp
                                                $job_db->exec_statement = "UPDATE $job_queue_tn SET status='waiting' WHERE macaddress LIKE '$macaddress' AND headertag = 'trigger_action_reinstall'";
                                                $job_db->exec_statement = "UPDATE $job_queue_tn SET timestamp='".&get_time(30)."' WHERE macaddress LIKE '$macaddress' AND headertag = 'trigger_action_reinstall'";
-                                               next;
                                        }
                                }
+                               next;
                        }
 
                        foreach my $jobdb_headertag (keys %{$hits->{$macaddress}}) {