Revision f7c4665f
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/BackgroundJob/Test.pm | ||
---|---|---|
5 | 5 |
use parent qw(SL::BackgroundJob::Base); |
6 | 6 |
|
7 | 7 |
sub run { |
8 |
my $self = shift;
|
|
9 |
my $db_obj = shift;
|
|
8 |
my ($self, $db_obj) = @_;
|
|
9 |
my $data = $db_obj->data_as_hash;
|
|
10 | 10 |
|
11 | 11 |
$::lxdebug->message(0, "Test job is being executed."); |
12 |
|
|
13 |
die "Oh cruel world: " . $data->{exception} if $data->{exception}; |
|
14 |
|
|
15 |
return exists $data->{result} ? $data->{result} : 1; |
|
12 | 16 |
} |
13 | 17 |
|
14 | 18 |
1; |
Auch abrufbar als: Unified diff
Test-BackgroundJob: Möglichkeiten, das Ergebnis zu steuern