Branch Coverage

blib/lib/TheSchwartz.pm
Criterion Covered Total %
branch 0 176 0.0


line true false branch
35 0 0 unless ref $client
38 0 0 unless not exists $args{'databases'} or ref $args{'databases'} eq 'ARRAY'
52 0 0 if $floor
54 0 0 if keys %args
67 0 0 unless $client->{'verbose'}
77 0 0 if ($ref->{'driver'}) { }
79 0 0 if (my $getter = $ref->{'driver'}->get_dbh) { }
91 0 0 unless $ref->{$_}
104 0 0 if ($cache_duration and $client->{'cached_drivers'}{$hashdsn}{'create_ts'} and $client->{'cached_drivers'}{$hashdsn}{'create_ts'} + $cache_duration > $t) { }
112 0 0 unless my $db = $client->{'databases'}{$hashdsn}
115 0 0 if ($db->{'driver'}) { }
125 0 0 if exists $db->{'prefix'}
127 0 0 if ($cache_duration)
148 0 0 if ($client->{'dead_dsns'}{$hashdsn})
149 0 0 if ($client->{'retry_at'}{$hashdsn} < time) { }
167 0 0 unless my $job = $driver->lookup('TheSchwartz::Job', $handle->jobid)
184 0 0 if exists $arg->{'run_after'}
187 0 0 if exists $arg->{'grabbed_until'}
190 0 0 if exists $arg->{'jobid'}
192 0 0 unless exists $arg->{'funcname'}
194 0 0 unless defined $arg->{'want_handle'}
198 0 0 if ($arg->{'coalesce'})
203 0 0 if ($client->prioritize) { }
213 0 0 if ($client->floor)
220 0 0 if $client->is_database_dead($hashdsn)
222 0 0 if (ref $arg->{'funcname'}) { }
232 0 0 if ($arg->{'want_handle'}) { }
270 0 0 if $client->is_database_dead($hashdsn)
276 0 0 if ($client->prioritize) { }
303 0 0 if ($client->floor)
312 0 0 if ($@)
313 0 0 unless ({1 => 1}->{$driver->last_error or 0})
319 0 0 if $job
329 0 0 if ($client->prioritize) { }
341 0 0 if $client->is_database_dead($hashdsn)
362 0 0 if ($client->floor)
371 0 0 if ($@)
372 0 0 unless ({1 => 1}->{$driver->last_error or 0})
378 0 0 if $T_AFTER_GRAB_SELECT_BEFORE_UPDATE
382 0 0 if $job
392 0 0 if $driver->dbd->isa('Data::ObjectDriver::Driver::DBD::Oracle')
404 0 0 $RANDOMIZE_JOBS ? :
417 0 0 unless my $server_time = $client->get_server_time($driver)
428 0 0 if ($driver->update($job, {'grabbed_until', ['-and', {'op', '=', 'value', $old_grabbed_until}, \" <= $unixtime"]}) < 1)
437 0 0 if $T_LOST_RACE
480 0 0 if ($@) { }
0 0 elsif ($job->jobid) { }
481 0 0 unless ({1 => 1}->{$driver->last_error or 0})
510 0 0 if $client->is_database_dead($hashdsn)
516 0 0 if ($h) { }
525 0 0 if eval { do { $driver->commit } }
530 0 0 wantarray ? :
536 0 0 if (ref $_[0] eq 'TheSchwartz::Job')
539 0 0 unless (ref $job eq 'TheSchwartz::Job')
547 0 0 if $client->is_database_dead($hashdsn)
554 0 0 if $handle
591 0 0 if (not @{$client->{'current_abilities'};})
599 0 0 unless my $job = $client->lookup_job($hstr)
607 0 0 unless my $job = $client->lookup_job($hstr)
614 0 0 if $current_time < $job->grabbed_until
617 0 0 unless $job = $client->_grab_a_job($hashdsn, $job)
628 0 0 unless $client->work_once
635 0 0 unless $client->work_once
651 0 0 if (not $job || $client->{'strict_remove_ability'} and @{$client->{'current_abilities'};} < @{$client->{'all_abilities'};})
659 0 0 $job ? :
660 0 0 if ($job) { }
661 0 0 $job->priority ? :
670 0 0 unless $job
677 0 0 unless $client->{'strict_remove_ability'}
697 0 0 unless (exists $cache->{'funcname2id'}{$funcname})
708 0 0 unless (exists $client->{'funcmap_cache'}{$hashdsn})
731 0 0 if ($logger and ref $logger ne 'CODE')
751 0 0 unless $dir
754 0 0 if ($dir eq '1' or $dir eq 'on')
759 0 0 if -e $dir
764 0 0 unless (-e $dir)
765 0 0 unless mkdir $dir, 493
777 0 0 unless $scoreboard
781 0 0 unless $job
785 0 0 unless open my $SB, '>', $scoreboard
806 0 0 if (ref $args) { }
807 0 0 if (ref $args eq 'HASH') { }
0 0 elsif (ref $args eq 'ARRAY') { }
827 0 0 unless $scoreboard
831 0 0 unless open my $SB, '>>', $scoreboard
844 0 0 unless $scoreboard
866 0 0 unless $client->prioritize
906 0 0 if (ref $arg and $arg->isa('TheSchwartz'))