From f7c4665fd435b94e599ea1ac2ba23d8e21a8420f Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 3 Jun 2014 17:10:25 +0200 Subject: [PATCH] =?utf8?q?Test-BackgroundJob:=20M=C3=B6glichkeiten,=20das?= =?utf8?q?=20Ergebnis=20zu=20steuern?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/BackgroundJob/Test.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SL/BackgroundJob/Test.pm b/SL/BackgroundJob/Test.pm index f79a1b586..c8c76db36 100644 --- a/SL/BackgroundJob/Test.pm +++ b/SL/BackgroundJob/Test.pm @@ -5,10 +5,14 @@ use strict; use parent qw(SL::BackgroundJob::Base); sub run { - my $self = shift; - my $db_obj = shift; + my ($self, $db_obj) = @_; + my $data = $db_obj->data_as_hash; $::lxdebug->message(0, "Test job is being executed."); + + die "Oh cruel world: " . $data->{exception} if $data->{exception}; + + return exists $data->{result} ? $data->{result} : 1; } 1; -- 2.20.1