From: rettenbe Date: Mon, 3 Nov 2008 16:29:44 +0000 (+0000) Subject: sheduled jobs can be deleted from job_queue expect trigger_action_reinstall and trigg... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2de95e71365be4dfb51fb2d9105882908321b007;p=gosa.git sheduled jobs can be deleted from job_queue expect trigger_action_reinstall and trigger_action_update git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12882 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 371fc8a6e..ae6372705 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -1798,12 +1798,21 @@ sub watch_for_new_jobs { $job_msg =~ /
(\S+)<\/header>/; my $header = $1 ; - my $func_error = &send_msg_to_target($job_msg, $server_address, $GosaPackages_key, $header, "J"); + 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"; - my $res = $job_db->update_dbentry($sql_statement); -# TODO: abfangen ob alles in ordnung ist oder nicht, wenn nicht error schmeißen + # update status in job queue to ... + # ... 'processing', for jobs: 'reinstall', 'update' + if (($header =~ /gosa_trigger_action_reinstall/) || ($header =~ /gosa_trigger_action_update/)) { + my $sql_statement = "UPDATE $job_queue_tn SET status='processing' WHERE id=$jobdb_id"; + my $dbres = $job_db->update_dbentry($sql_statement); + } + + # ... 'done', for all other jobs, they are no longer needed in the jobqueue + else { + my $sql_statement = "UPDATE $job_queue_tn SET status='done' WHERE id=$jobdb_id"; + my $dbres = $job_db->update_dbentry($sql_statement); + } + # We don't want parallel processing last;