From: rettenbe Date: Wed, 6 May 2009 14:37:14 +0000 (+0000) Subject: updating 'waiting' softupdate or reinstalling jobs to 'processing' if client wakes... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=43fdc29f211a87f70f3830f016490fd5235256d5;p=gosa.git updating 'waiting' softupdate or reinstalling jobs to 'processing' if client wakes up and reports progress git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13621 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/trunk/gosa-si/server/events/clMessages.pm b/trunk/gosa-si/server/events/clMessages.pm index 2b4ff98d9..36fac0be2 100644 --- a/trunk/gosa-si/server/events/clMessages.pm +++ b/trunk/gosa-si/server/events/clMessages.pm @@ -548,6 +548,14 @@ sub TASKBEGIN { # other TASKBEGIN msgs } else { + + # TASKBEGIN msgs do only occour during a softupdate or a reinstallation + # of a host. Set all waiting update- or reinstall-jobs for host to + # processing so they can be handled correctly by the rest of the function. + my $waiting_sql = "UPDATE $main::job_queue_tn SET status='processing' WHERE status='waiting' AND macaddress LIKE '$macaddress' AND (headertag='trigger_action_update' OR headertag='trigger_action_reinstall')"; + &main::daemon_log("$session_id DEBUB: $waiting_sql", 7); + my $waiting_res = $main::job_db->update_dbentry($waiting_sql); + # select processing jobs for host my $sql_statement = "SELECT * FROM $main::job_queue_tn WHERE status='processing' AND macaddress LIKE '$macaddress'"; &main::daemon_log("$session_id DEBUG: $sql_statement", 7);