summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7feb834)
raw | patch | inline | side by side (parent: 7feb834)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 10 Nov 2008 10:55:20 +0000 (10:55 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 10 Nov 2008 10:55:20 +0000 (10:55 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@12981 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/server/events/gosaTriggered.pm | patch | blob | history |
index d84e59585d8b612476c42b6fb2d40e7872303e35..e792f3ba3d0c4d9027fee90db3898df5af05d0ee 100644 (file)
# To prevent replication problems just re-queue the job with 10 seconds in the future
my $moddn_result = $ldap_entry->update($ldap_handle);
if ($moddn_result->code() != 0) {
- &main::daemon_log("$session_id ERROR: Moving the system with mac address '$mac' to new base '$base' failed (code '".$moddn_result->code()."') with '".$moddn_result->{'errorMessage'}."'!", 1);
- $main::job_db->exec_statement("UPDATE ".$main::job_queue_tn." SET status = 'waiting' WHERE id = $jobdb_id");
- $main::job_db->exec_statement("UPDATE ".$main::job_queue_tn." SET timestamp = '".(&calc_timestamp(&get_time(), 'plus', 10))."' WHERE id = $jobdb_id");
- return undef;
+ my $error_string = "Moving the system with mac address '$mac' to new base '$base' failed (code '".$moddn_result->code()."') with '".$moddn_result->{'errorMessage'}."'!";
+ &main::daemon_log("$session_id ERROR: $error_string", 1);
+ my $sql = "UPDATE $main::job_queue_tn SET status='error', result='$error_string' WHERE id=$jobdb_id";
+ return undef;
} else {
&main::daemon_log("$session_id INFO: System with mac address '$mac' was moved to base '".$main::ldap_base."'! Re-queuing job.", 4);
$main::job_db->exec_statement("UPDATE ".$main::job_queue_tn." SET status = 'waiting' WHERE id = $jobdb_id");