blib/lib/Minion/Backend/Storable.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 109 | 127 | 85.8 |
line | l | !l | condition |
---|---|---|---|
116 | 0 | 40 | push @$locks, $this_expires and return 1 |
277 | 0 | 193 | $job = $candidate and last CANDIDATE |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
85 | 15 | 15 | 92 | (!defined($options->{'queue'}) || $_->{'queue'} eq $options->{'queue'}) && (!defined($options->{'state'}) || $_->{'state'} eq $options->{'state'}) && (!defined($options->{'task'}) || $_->{'task'} eq $options->{'task'}) |
87 | 0 | 0 | 62 | ($_->{'children'} = $guard->_children($_->{'id'})) && $_ |
169 | 3 | 5 | 0 | $_->{'notified'} < $after and delete $$workers{$_->{'id'}} |
174 | 88 | 53 | 31 | $job->{'state'} eq 'finished' and $job->{'finished'} <= $after |
181 | 126 | 1 | 16 | $_->{'state'} eq 'active' && !exists($$workers{$_->{'worker'}}) |
201 | 91 | 15 | 0 | exists $options->{$_} and $job->{$_} = $options->{$_} |
216 | 226 | 5 | 18 | $job->{'state'} eq 'active' and not $seen{$job->{'worker'}}++ |
218 | 194 | 53 | 2 | $job->{'state'} eq 'inactive' and &Minion::Backend::Storable::time() < $job->{'delayed'} || @{$job->{'parents'};} |
242 | 20 | 35 | 45 | $i < $length and ($locks->[$i] // 0) <= $now |
271 | 20 | 10 | 255 | $_->{'state'} eq 'inactive' && $queues{$_->{'queue'}} && $$tasks{$_->{'task'}} && $_->{'delayed'} <= $now |
280 | 2 | 7 | 6 | exists $jobs->{$parent} and grep(($jobs->{$parent}{'state'} eq $_), ('active', 'failed', 'inactive')) |
303 | 96 | 53 | 5 | $fail and $job->{'attempts'} > $retries + 1 |
311 | 10 | 5 | 85 | $id and my $worker = $guard->_workers->{$id} |
314 | 170 | 0 | 15 | $_->{'state'} eq 'active' && $_->{'worker'} eq $id |
line | l | !l | condition |
---|---|---|---|
20 | 5 | 2 | shift() // [] |
4 | 3 | shift() // [] | |
28 | 9 | 1 | $inboxes->{$_} //= [] |
42 | 104 | 66 | shift() // [] |
30 | 140 | shift() // {} | |
55 | 6 | 164 | $options->{'attempts'} // 1 |
5 | 165 | $options->{'delay'} // 0 | |
5 | 165 | $options->{'notes'} // {} | |
4 | 166 | $options->{'parents'} // [] | |
5 | 165 | $options->{'priority'} // 0 | |
5 | 165 | $options->{'queue'} // 'default' | |
99 | 45 | 30 | shift() // {} |
100 | 45 | 30 | $options->{'limit'} || 1 |
103 | 55 | 20 | $guard->_locks->{$name} //= [] |
107 | 70 | 10 | $_ // 0 |
116 | 15 | 25 | $$locks[$#$locks] // 0 |
119 | 0 | 0 | $a // 0 |
0 | 0 | $b // 0 | |
135 | 4 | 1 | $inboxes->{$id} // [] |
141 | 142 | 0 | shift() // {} |
148 | 142 | 0 | $options->{'status'} // {} |
192 | 25 | 40 | shift() // {} |
229 | 18 | 50 | $states{'active'} // 0 |
13 | 55 | $states{'failed'} // 0 | |
30 | 38 | $states{'finished'} // 0 | |
42 | 26 | $states{'inactive'} // 0 | |
237 | 55 | 0 | $guard->_locks->{$name} //= [] |
242 | 35 | 45 | $locks->[$i] // 0 |
263 | 20 | 242 | $options->{'queues'} // ['default'] |
277 | 202 | 0 | $candidate->{'parents'} // [] |
346 | 4637 | 0 | $job->{'parents'} // [] |
360 | 105 | 10 | $_[0]->_data->{'inboxes'} //= {} |
368 | 58 | 10 | $_[0]->_data->{'job_count'} //= 0 |
378 | 2113 | 11 | $_[0]->_data->{'jobs'} //= {} |
382 | 125 | 10 | $_[0]->_data->{'locks'} //= {} |
386 | 574 | 10 | $_[0]->_data->{'workers'} //= {} |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
35 | 196 | 0 | 33 | $self->_try($id, $options) || do { &usleep($wait * 1000000); $self->_try($id, $options) } |
218 | 5 | 2 | 48 | &Minion::Backend::Storable::time() < $job->{'delayed'} || @{$job->{'parents'};} |
351 | 2453 | 1806 | 0 | $_[0]{'data'} //= $_[0]->_load($_[0]{'backend'}->file) |