| 1 | package Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling; | ||||||||||||||||||||||||||||
| 2 | 10 | our $AUTHORITY = 'cpan:TAPPER'; | |||||||||||||||||||||||||||
| 3 | 10 | $Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::VERSION = '5.0.12'; | |||||||||||||||||||||||||||
| 4 | 10 | ▶ | use 5.010; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 10 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 10 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 10 | ▶ | use parent 'DBIx::Class::ResultSet'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | sub non_scheduled_jobs | ||||||||||||||||||||||||||||
| 12 | 0 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
non_scheduled_jobs: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 13 | 0 | shift->search({ status => "schedule" }); | |||||||||||||||||||||||||||
| 14 | } | ||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | 0 | ▶ | sub max_priority_seq { | ||||||||||||||||||||||||||
|
Subroutine
max_priority_seq: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||
| 18 | 0 | my ($self) = @_; | |||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 0 | my $job_with_max_seq = $self->result_source->schema->resultset('TestrunScheduling')->search | |||||||||||||||||||||||||||
| 21 | ( | ||||||||||||||||||||||||||||
| 22 | { prioqueue_seq => { '>', 0 } }, | ||||||||||||||||||||||||||||
| 23 | { | ||||||||||||||||||||||||||||
| 24 | select => [ { max => 'prioqueue_seq' } ], | ||||||||||||||||||||||||||||
| 25 | as => [ 'max_seq' ], | ||||||||||||||||||||||||||||
| 26 | rows => 1, | ||||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||
| 28 | )->first; | ||||||||||||||||||||||||||||
| 29 | 0 | ▶ | return $job_with_max_seq->get_column('max_seq') if $job_with_max_seq and $job_with_max_seq->get_column('max_seq'); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$job_with_max_seq and $job_with_max_seq->get_column("max_seq")
MC/DC0%0/2
$job_with_max_seq and $job_with_max_seq->get_column("max_seq")
$job_with_max_seq
$job_with_max_seq->get_column("max_seq")
Truth table0%0/3
A and B
A= $job_with_max_seqB= $job_with_max_seq->get_column("max_seq")
| |||||||||||||||||||||||||||||
| 30 | 0 | return 0; | |||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | sub running_jobs | ||||||||||||||||||||||||||||
| 35 | 0 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
running_jobs: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 36 | 0 | shift->search({ status => "running" }); | |||||||||||||||||||||||||||
| 37 | } | ||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | 0 | ▶ | sub running { | ||||||||||||||||||||||||||
|
Subroutine
running: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 41 | 0 | shift->search({ status => 'running' }); | |||||||||||||||||||||||||||
| 42 | } | ||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | 10 | 1; | |||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | __END__ | ||||||||||||||||||||||||||||