$options ||= {};
# loop through list of URLs / session URLs
- # TODO: see if we've already tested the url, if so copy the status info / redirect_to info and move on
# add a sleep (org setting) to the multisession handler
# TODO: Avoid testing URLs having the same domain sequentially
);
}
+
+# finds the 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) = @_;
+
+ my $match = $e->json_query({
+ select => {uvuv => ['id']},
+ from => {
+ uvuv => {
+ uvva => {}, # attempt
+ uvu => {} # url
+ }
+ },
+ where => {
+ '+uvu' => {
+ id => {'!=' => $url->id},
+ full_url => $url->full_url
+ }
+ }
+ })->[0];
+
+ return $e->retrieve_url_verify_url_verification($match->{id}) if $match;
+ return undef;
+}
+
+
=head comment
1. create the verification object and commit.
# begin phase-I DB communication
$e->xact_begin;
+
+ my $match_vcation = find_matching_url_for_attempt($e, $attempt, $url);
+
+ if ($match_vcation) {
+ $logger->info("url: found matching URL in verification attempt [$url_text]");
+ $vcation->redirect_to($match_vcation->url);
+ }
+
$e->create_url_verify_url_verification($vcation) or return $e->die_event;
$e->xact_commit;
+ # found a matching URL, no need to re-process
+ return {verification => $vcation} if $match_vcation;
+
# End phase-I DB communication
# No active DB xact means no cstore timeout concerns.