| line |
true |
false |
branch |
|
46
|
0 |
0 |
unless defined $params{$_} |
|
55
|
0 |
0 |
unless exists $AllowedNewParams{$_} |
|
77
|
0 |
0 |
if $self->db |
|
95
|
0 |
0 |
unless @_ |
|
120
|
0 |
0 |
if ($n == 1) { } |
|
126
|
0 |
0 |
if (not defined $value and $doblocking == 1) |
|
129
|
0 |
0 |
unless $value |
|
141
|
0 |
0 |
if ($n > 30) |
|
144
|
0 |
0 |
if $l < $n |
|
148
|
0 |
0 |
if (defined $_[0]) |
|
154
|
0 |
0 |
if (@items == 0 and $doblocking == 1) |
|
157
|
0 |
0 |
if (defined $serial) |
|
162
|
0 |
0 |
if (defined $_[0]) |
|
173
|
0 |
0 |
unless (eval {
do {
$conn->rpoplpush($qn, $bq, sub {
if (defined $_[0]) {
push @items, 'Queue::Q::ReliableFIFO::Item'->new('_serialized', $_[0]);
};
}
) foreach (1 .. $n);
$conn->wait_all_responses;
if (@items == 0 and $doblocking == 1) {
$serial = $conn->brpoplpush($qn, $bq, $timeout);
if (defined $serial) {
push @items, 'Queue::Q::ReliableFIFO::Item'->new('_serialized', $serial);
undef $serial;
$conn->rpoplpush($qn, $bq, sub {
if (defined $_[0]) {
push @items, 'Queue::Q::ReliableFIFO::Item'->new('_serialized', $_[0]);
};
}
) foreach (1 .. $n - 1);
$conn->wait_all_responses;
};
};
1
}
}) |
|
182
|
0 |
0 |
if (@_ == 1) { } |
|
243
|
0 |
0 |
unless (eval {
do {
$n += $self->_lua->call('requeue_busy', 3, $self->_busy_queue, $self->_main_queue, $self->_failed_queue, time, $_->_serialized, $self->requeue_limit, $place, $error || '') foreach (@_);
1
}
}) |
|
273
|
0 |
0 |
unless (eval {
do {
foreach $_ (@_) {
$n += $self->_lua->call('requeue_failed_item', 2, $self->_failed_queue, $self->_main_queue, time, $_->_serialized);
&usleep(100000);
};
1
}
}) |
|
281
|
0 |
0 |
if (@_ == 1) |
|
292
|
0 |
0 |
unless (defined $n) |
|
305
|
0 |
0 |
if ($self->queue_length('failed') > 0) |
|
343
|
0 |
0 |
if ($self->queue_length('failed') > 0) |
|
364
|
0 |
0 |
if $total_removed == 0 |
|
402
|
0 |
0 |
unless $serial |
|
416
|
0 |
0 |
unless $serial |
|
451
|
0 |
0 |
if not exists $QueueType{$$type} |
|
460
|
0 |
0 |
if $mem_avail == 0 |
|
476
|
0 |
0 |
unless exists $ValidErrorActions{$error_action} |
|
486
|
0 |
0 |
$options ? : |
|
488
|
0 |
0 |
if !$chunk > 0 |
|
490
|
0 |
0 |
if exists $options->{'DieOnError'} |
|
499
|
0 |
0 |
if $process_all and $chunk <= 1 |
|
501
|
0 |
0 |
if $pause and $chunk <= 1 |
|
505
|
0 |
0 |
unless exists $ValidOptions{$_} |
|
507
|
0 |
0 |
$maxseconds > 0 ? : |
|
512
|
0 |
0 |
ref $SIG{'INT'} eq 'CODE' ? : |
|
513
|
0 |
0 |
ref $SIG{'TERM'} eq 'CODE' ? : |
|
517
|
0 |
0 |
if $sigint |
|
518
|
0 |
0 |
$nohandlers ? : |
|
522
|
0 |
0 |
if $sigterm |
|
523
|
0 |
0 |
$nohandlers ? : |
|
525
|
0 |
0 |
if ($chunk == 1) { } |
|
531
|
0 |
0 |
unless ($item) |
|
532
|
0 |
0 |
if $return_when_empty or $stop_time > 0 and time >= $stop_time |
|
538
|
0 |
0 |
if (not $ok) { } |
|
540
|
0 |
0 |
if $warn_on_error and $error |
|
544
|
0 |
0 |
unless (eval {
do {
&$onerror($self, $item, $error);
1
}
}) |
|
545
|
0 |
0 |
if $stop |
|
551
|
0 |
0 |
if ($return) |
|
560
|
0 |
0 |
unless (eval {
do {
$done_count += $self->mark_item_as_done($item);
1
}
}) |
|
561
|
0 |
0 |
if $stop |
|
568
|
0 |
0 |
if $maxitems > 0 and --$maxitems == 0 or $stop_time > 0 and time >= $stop_time |
|
572
|
0 |
0 |
if $self->warn_on_requeue and $still_busy |
|
582
|
0 |
0 |
if ($pause) |
|
584
|
0 |
0 |
if $pt > 0 |
|
588
|
0 |
0 |
unless (eval {
do {
@items = $self->claim_item($chunk);
1
}
}) |
|
591
|
0 |
0 |
if $pause |
|
592
|
0 |
0 |
if (@items == 0) |
|
593
|
0 |
0 |
if $return_when_empty or $stop_time > 0 and time >= $stop_time |
|
598
|
0 |
0 |
if ($process_all) { } |
|
601
|
0 |
0 |
if ($ok) { } |
|
608
|
0 |
0 |
if $warn_on_error and $error |
|
613
|
0 |
0 |
unless (eval {
do {
&$onerror($self, $item, $error);
1
}
}) |
|
614
|
0 |
0 |
if $stop |
|
620
|
0 |
0 |
if ($return) |
|
624
|
0 |
0 |
if $stop |
|
632
|
0 |
0 |
if ($ok) { } |
|
637
|
0 |
0 |
if $warn_on_error and $error |
|
642
|
0 |
0 |
unless (eval {
do {
&$onerror($self, $item, $error);
1
}
}) |
|
643
|
0 |
0 |
if $stop |
|
649
|
0 |
0 |
if ($return) |
|
654
|
0 |
0 |
if $stop |
|
660
|
0 |
0 |
unless (eval {
do {
$count += $self->mark_item_as_done(@done);
1
}
}) |
|
661
|
0 |
0 |
if $stop |
|
667
|
0 |
0 |
if $self->warn_on_requeue and $count != @done |
|
671
|
0 |
0 |
if (@items > 0) |
|
676
|
0 |
0 |
unless (eval {
do {
$self->unclaim($_) foreach (@items);
1
}
}) |
|
677
|
0 |
0 |
if $stop |
|
684
|
0 |
0 |
if $maxitems > 0 and ($maxitems -= @done) <= 0 or $stop_time > 0 and time >= $stop_time |
|
702
|
0 |
0 |
unless int $timeout |
|
703
|
0 |
0 |
unless $action and $action =~ /^(?:requeue|drop)$/ |
|
716
|
0 |
0 |
if ($action eq 'requeue') { } |
|
|
0 |
0 |
elsif ($action eq 'drop') { } |
|
722
|
0 |
0 |
if $n |
|
729
|
0 |
0 |
if $n |