summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fafbb75)
raw | patch | inline | side by side (parent: fafbb75)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Feb 2008 12:57:27 +0000 (12:57 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Feb 2008 12:57:27 +0000 (12:57 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9016 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-server | patch | blob | history | |
gosa-si/modules/GosaPackages.pm | patch | blob | history |
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index 4ea7bdbabe92a0f3b11276d6df567df426171ef9..2ffe6f7d09343c5489ac5f60ecc1caffc768d24a 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
}
}
- return;
+ return $error;
}
# add sqlite_id
$job_msg =~ s/<\/xml>$/<jobdb_id>$jobdb_id<\/jobdb_id><\/xml>/;
- &send_msg_to_target($job_msg, $server_address, $GosaPackages_key, $header);
+ my $func_error = &send_msg_to_target($job_msg, $server_address, $GosaPackages_key, $header);
-# my $error = 1;
-# if ($error == 0) {
-# my $sql_statement = "UPDATE $job_queue_table_name ".
-# "SET status='done', targettag='$target' ".
+# if ( $func_error ) {
+#print STDERR "========================================\n";
+#print STDERR "func_error: $func_error\n";
+#
+# my $sql_statement = "UPDATE $job_queue_table_name ".
+# "SET status='error', targettag='$target' ".
# "WHERE id='$jobdb_id'";
-# my $res = $job_db->update_dbentry($sql_statement);
-# } else {
-# my $sql_statement = "UPDATE $job_queue_table_name ".
-# "SET status='error' ".
+#print STDERR "sql: $sql_statement\n";
+# my $res = $job_db->update_dbentry($sql_statement);
+#print STDERR "res: ".Dumper($res);
+#
+# } else {
+#print STDERR "========================================\n";
+#print STDERR "func_error: $func_error\n";
+#
+# my $sql_statement = "UPDATE $job_queue_table_name ".
+# "SET status='done', targettag='$target' ".
# "WHERE id='$jobdb_id'";
-# my $res = $job_db->update_dbentry($sql_statement);
-# }
- }
+#print STDERR "sql: $sql_statement\n";
+# my $res = $job_db->update_dbentry($sql_statement);
+#print STDERR "res: ".Dumper($res);
+# }
+ }
$kernel->delay_set('watch_for_new_jobs',3);
}
#unlink('/tmp/gosa_si_lock*');
# connect to gosa-si job queue
-my @job_col_names = ("id INTEGER", "timestamp", "status", "result", "headertag", "targettag", "xmlmessage", "macaddress");
+my @job_col_names = ("id INTEGER", "timestamp", "status", "result", "progress", "headertag", "targettag", "xmlmessage", "macaddress");
$job_db = GOSA::DBsqlite->new($job_queue_file_name);
$job_db->create_table('jobs', \@job_col_names);
index 7e5eb63f5010a9921325181ea91f7581236fa37c..b0884efab047c6dbc393c0c91efca2fb8d5eb580 100644 (file)
timestamp=>$timestamp,
status=>'waiting',
result=>'none',
+ progress=>'none',
headertag=>$header,
targettag=>$target,
xmlmessage=>$msg,