From fafc4b3ffa4a46dae8bc53c82fec1a5523c9b371 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 13 Jan 2011 13:27:56 +0100 Subject: [PATCH] =?utf8?q?Ausf=C3=BChrungsfehler=20bei=20Jobs=20auch=20im?= =?utf8?q?=20Debug-Log=20als=20WARNING=20ausgeben?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/BackgroundJob.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.20.1