| 1 | package Qudo::Hook::Notify::ReachMaxRetry; | ||||||||||||||||||||||||||||
| 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_reach_max_retry'} = sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||
| 12 | 0 | my $job = shift; | |||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 0 | ▶ | if ($job->is_failed && ( $job->funcname->max_retries <= ($job->retry_cnt) )) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$job->is_failed and $job->funcname->max_retries <= $job->retry_cnt
MC/DC0%0/2
$job->is_failed and $job->funcname->max_retries <= $job->retry_cnt
$job->is_failed
$job->funcname->max_retries <= $job->retry_cnt
Truth table0%0/3
A and B
A= $job->is_failedB= $job->funcname->max_retries <= $job->retry_cnt
| |||||||||||||||||||||||||||||
| 15 | $klass->plugin->{logger}->emergency( | ||||||||||||||||||||||||||||
| 16 | 0 | sprintf('%s already retry max!!',$job->funcname) | |||||||||||||||||||||||||||
| 17 | ); | ||||||||||||||||||||||||||||
| 18 | } | ||||||||||||||||||||||||||||
| 19 | 0 | }; | |||||||||||||||||||||||||||
| 20 | } | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 0 | ▶ | sub unload { | ||||||||||||||||||||||||||
|
Subroutine
unload: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 23 | 0 | my ($class, $klass) = @_; | |||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | 0 | delete $klass->hooks->{post_work}->{'notify_reach_max_retry'}; | |||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | 1 | 1; | |||||||||||||||||||||||||||
| 30 | __END__ | ||||||||||||||||||||||||||||