X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/db4680753f5ec1de62bdc0557f850afd810444d1..bcc996e65643:/SL/BackgroundJob/SelfTest.pm?ds=sidebyside diff --git a/SL/BackgroundJob/SelfTest.pm b/SL/BackgroundJob/SelfTest.pm index c1c608bbf..10438644c 100644 --- a/SL/BackgroundJob/SelfTest.pm +++ b/SL/BackgroundJob/SelfTest.pm @@ -48,18 +48,11 @@ sub setup { sub run { my $self = shift; - my $db_obj = shift; - # options - my $options = $db_obj->data_as_hash; $self->setup; return 1 unless $self->modules; - - $main::lxdebug->message(0, 'optioni' . Dumper($self->modules)); foreach my $module ($self->modules) { - next unless $module eq $options->{module}; - $main::lxdebug->message(0, 'hieur' . $module); $self->run_module($module); } @@ -70,8 +63,9 @@ sub run { $self->aggreg->failed, $self->aggreg->todo_passed, ); - - if (!$self->aggreg->all_passed || $self->config->{send_email_on_success}) { + # if (!$self->aggreg->all_passed || $self->config->{send_email_on_success}) { + # all_passed is not set or calculated (anymore). it is safe to check only for probs or errors + if ($self->aggreg->failed || $self->config->{send_email_on_success}) { $self->_send_email; } @@ -140,7 +134,9 @@ sub _send_email { $mail->{content_type} = $content_type; $mail->{message} = $$output; - $mail->send; + my $err = $mail->send; + $self->add_errors('Mailer error #1', $err) if $err; + } sub _prepare_report {