Notify/Abort.pm

filter: Statementstmt 55.5% 10 / 18 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 42.8% 3 / 7 Podpod 0.0% 0 / 3 totaltotal 43.3% 13 / 30 CC 2 SCAR 9.7
CC
2
Cov
50%
__ANON__
6.0
hook_point
2.0
load
2.0
CRAP 2.6
« Notify/ReachMaxRetry.pm ↑ Summary Notify/Failed.pm »
1 package Qudo::Hook::Notify::Abort;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use base 'Qudo::Hook';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 0 ▶sub hook_point { 'post_work' }
Subroutine hook_point: not called CC=1 SCAR=6.9
Pod undocumented
7  
8 0 ▶sub load {
Subroutine load: not called CC=1 SCAR=6.9
Pod undocumented
9 0 my ($class, $klass) = @_;
10  
11 0 ▶ $klass->hooks->{post_work}->{'notify_abort'} = sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
12 0 my $job = shift;
13 0 ▶ if ($job->is_aborted) {
Branch: 1 branch
BranchTrueFalseTotal
if ($job->is_aborted) 0 0 0
14 $klass->plugin->{logger}->emergency(
15 0 sprintf('%s is abort!!',$job->funcname)
16 );
17 }
18 0 };
19 }
20  
21 0 ▶sub unload {
Subroutine unload: not called CC=1 SCAR=6.9
Pod undocumented
22 0 my ($class, $klass) = @_;
23  
24 0 delete $klass->hooks->{post_work}->{'notify_abort'};
25 }
26  
27  
28 1 1;
29 __END__
« Notify/ReachMaxRetry.pm ↑ Summary Notify/Failed.pm »