projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ausführungsfehler bei Jobs auch im Debug-Log als WARNING ausgeben
[kivitendo-erp.git]
/
SL
/
DB
/
BackgroundJob.pm
diff --git
a/SL/DB/BackgroundJob.pm
b/SL/DB/BackgroundJob.pm
index
8945ceb
..
743a6b5
100644
(file)
--- a/
SL/DB/BackgroundJob.pm
+++ b/
SL/DB/BackgroundJob.pm
@@
-42,13
+42,16
@@
sub run {
};
if (!$ok) {
};
if (!$ok) {
+ my $error = $EVAL_ERROR;
$history = SL::DB::BackgroundJobHistory
->new(package_name => $self->package_name,
run_at => $run_at,
status => 'failure',
$history = SL::DB::BackgroundJobHistory
->new(package_name => $self->package_name,
run_at => $run_at,
status => 'failure',
- error
=> $EVAL_ERROR
,
+ error
_col => $error
,
data => $self->data);
$history->save;
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;
}
$self->assign_attributes(last_run_at => $run_at)->update_next_run_at;