From: rettenbe Date: Mon, 3 Nov 2008 17:09:48 +0000 (+0000) Subject: not all scheduled jobs should not remain in jobqueue X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0571321bed16ce9981254b2358b1f9e4820f33f5;p=gosa.git not all scheduled jobs should not remain in jobqueue git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@12884 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 6f8c4d12b..4254ccba9 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -1774,10 +1774,18 @@ sub watch_for_new_jobs { my $header = $1 ; 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;