From: Moritz Bunkus Date: Thu, 13 Jan 2011 12:27:56 +0000 (+0100) Subject: Ausführungsfehler bei Jobs auch im Debug-Log als WARNING ausgeben X-Git-Tag: release-2.6.3~61^2~7^2~1^2~2^2~29 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=fafc4b3ffa4a46dae8bc53c82fec1a5523c9b371;p=kivitendo-erp.git Ausführungsfehler bei Jobs auch im Debug-Log als WARNING ausgeben --- diff --git a/SL/DB/BackgroundJob.pm b/SL/DB/BackgroundJob.pm index 253d0d380..743a6b5ea 100644 --- a/SL/DB/BackgroundJob.pm +++ b/SL/DB/BackgroundJob.pm @@ -42,13 +42,16 @@ sub run { }; if (!$ok) { + my $error = $EVAL_ERROR; $history = SL::DB::BackgroundJobHistory ->new(package_name => $self->package_name, run_at => $run_at, status => 'failure', - error_col => $EVAL_ERROR, + error_col => $error, data => $self->data); $history->save; + + $::lxdebug->message(LXDebug->WARN(), "BackgroundJob ID " . $self->id . " execution error (first three lines): " . join("\n", (split(m/\n/, $error))[0..2])); } $self->assign_attributes(last_run_at => $run_at)->update_next_run_at;