my $org = $attempt->session->owning_lib;
- if (!$cache{delay}{$org}) {
+ if (!$cache{timeout}{$org}) {
+
$cache{delay}{$org} = $U->ou_ancestor_setting_value(
- $org, 'url_verify.url_verification_delay', $e) || 2;
+ $org, 'url_verify.url_verification_delay', $e);
+
+ # 0 is a valid delay
+ $cache{delay}{$org} = 2 unless defined $cache{delay}{$org};
$cache{redirects}{$org} = $U->ou_ancestor_setting_value(
$org, 'url_verify.url_verification_max_redirects', $e) || 20;
}
-# finds the url_verfication for any url processed within this
-# verification attempt whose full_url matches the full_url of
-# the provided URL.
+# searches for a completed url_verfication for any url processed
+# within this verification attempt whose full_url matches the
+# full_url of the provided URL.
sub find_matching_url_for_attempt {
my ($e, $attempt, $url) = @_;
'+uvu' => {
id => {'!=' => $url->id},
full_url => $url->full_url
+ },
+
+ # There could be multiple verifications for matching URLs
+ # We only want a verification that completed.
+ # Note also that 2 identical URLs processed within the same
+ # sub-batch will have to each be fully processed in their own
+ # right, since neither knows how the other will ultimately fare.
+ '+uvuv' => {
+ res_time => {'!=' => undef}
}
}
})->[0];