summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8e9f124)
raw | patch | inline | side by side (parent: 8e9f124)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 18 Mar 2008 17:10:20 +0000 (17:10 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 18 Mar 2008 17:10:20 +0000 (17:10 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9933 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/modules/GosaPackages.pm | patch | blob | history | |
gosa-si/server/events/clMessages.pm | patch | blob | history |
index 7c396167db8d2bb95af7705a0af6d73f5e8e6c70..b616de5ba26a40210210df2b5bef94be229a4479 100644 (file)
}
foreach my $out_msg ( @msg_l ) {
-
-# # keep job queue up-to-date and save result and status
-# if (defined ($out_msg) && $out_msg =~ /<jobdb_id>(\d+)<\/jobdb_id>/) {
-# my $job_id = $1;
-# my $sql = "UPDATE '".$main::job_queue_tn."'".
-# " SET status='processing'".
-# " WHERE id='$job_id'";
-# my $res = $main::job_db->exec_statement($sql);
-# }
-
# substitute in all outgoing msg <source>GOSA</source> of <source>$server_address</source>
$out_msg =~ s/<source>GOSA<\/source>/<source>$server_address<\/source>/g;
$out_msg =~ s/<\/xml>/<session_id>$session_id<\/session_id><\/xml>/;
@out_msg_l = &{$event_hash->{$header}."::$header"}($msg, $msg_hash, $session_id);
}
- # if incoming 'gosa_'-msg is scheduled from job_queue, than it contains xml-tag 'jobdb_id'
- # after procesing this msg, set status of this job in job_queue to done
-# if ($msg =~ /<jobdb_id>(\d+)<\/jobdb_id>/) {
-# my $sql_statement = "UPDATE $main::job_queue_tn ".
-# "SET status='done' ".
-# "WHERE id='$1'";
-# &main::daemon_log("DEBUG: $sql_statement", 7);
-# my $res = $main::job_db->update_dbentry($sql_statement);
-# &main::daemon_log("INFO: set job '$1' to status 'done'", 5);
-# }
-
# if delivery not possible raise error and return
if( not defined $out_msg_l[0] ) {
# &main::daemon_log("WARNING: GosaPackages got no answer from event handler '$header'", 3);
index 23b302282c6860687ddd9bc61aa09c0d01ea4dc1..698dad28e6684cde40c197b9d741b2d3ec5cc9ec 100644 (file)
# clean up header
$header =~ s/CLMSG_//g;
- my $sql_statement = "UPDATE $main::job_queue_tn ".
- "SET status='processing', result='$header "."$content' ".
- "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);
- &main::daemon_log("$session_id INFO: $header at '$macaddress' - '$content'", 5);
+ if ($header eq "TASKEND softupdate 0") {
+ &main::daemon_log("$session_id DEBUG: softupdate at host '$source' successful", 7);
+ my $sql_statement = "DELETE FROM $main::job_queue_tn WHERE status='processing' AND macaddress LIKE '$macaddress'";
+ &main::daemon_log("$session_id DEBUG: $sql_statement", 7);
+ my $res = $main::job_db->del_dbentry($sql_statement);
+
+ } else {
+
+ my $sql_statement = "UPDATE $main::job_queue_tn ".
+ "SET status='processing', result='$header "."$content' ".
+ "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);
+ &main::daemon_log("$session_id INFO: $header at '$macaddress' - '$content'", 5);
+ }
# -----------------------> Update hier
# <CLMSG_TASKBEGIN>finish</CLMSG_TASKBEGIN>
# <header>CLMSG_TASKBEGIN</header>