Branch Coverage

blib/lib/Minion/Backend/SQLite.pm
Criterion Covered Total %
branch 63 76 82.8


line true false branch
25 3 4 @$ids ? :
36 86 413 unless ($job)
59 1 393 $options->{'lax'} ? :
107 56 1240 if (defined(my $before = $options->{'before'}))
111 1093 203 if (defined(my $ids = $options->{'ids'}))
113 1093 0 @$ids ? :
116 0 1296 if (defined(my $notes = $options->{'notes'}))
119 16 1280 if (defined(my $queues = $options->{'queues'}))
121 16 0 @$queues ? :
124 35 1261 if (defined(my $states = $options->{'states'}))
126 35 0 @$states ? :
129 16 1280 if (defined(my $tasks = $options->{'tasks'}))
131 16 0 @$tasks ? :
136 1296 0 @where ? :
165 16 56 if (defined(my $names = $options->{'names'}))
167 16 0 @$names ? :
189 48 185 if (defined(my $before = $options->{'before'}))
193 113 120 if (defined(my $ids = $options->{'ids'}))
195 113 0 @$ids ? :
199 153 80 @where ? :
224 80 200 if defined $locks and $locks >= ($options->{'limit'} || 1)
225 152 48 if (defined $duration and $duration > 0)
237 0 40 if $key =~ /[\[\].]/u
239 24 16 if (defined $merge->{$key}) { }
250 24 8 if @set
251 8 24 if @remove
264 9 0 if $array
267 9 0 $array ? :
275 46 261 if $id and $self->sqlite->db->query("update minion_workers set notified = datetime('now'), status = ?\n where id = ?", {"json", $options->{'status'} // {}}, $id)->rows
327 18 8 if ($options->{'all'}) { }
8 0 elsif ($options->{'locks'}) { }
344 1 131 defined $options->{'parents'} ? :
356 1 1 $options->{'lax'} ? :
2 130 exists $options->{'lax'} ? :
401 0 617 unless @$queues and @$tasks
440 130 276 $fail ? :
70 336 unless $db->query("update minion_jobs\n set finished = datetime('now'), result = ?, state = ?\n where id = ? and retries = ? and state = 'active'", {"json", $result}, $fail ? "failed" : "finished", $id, $retries)->rows > 0
448 122 214 $fail ? :