-package OpenILS::Application::url_verify;
+package OpenILS::Application::URLVerify;
use base qw/OpenILS::Application/;
use strict; use warnings;
use OpenSRF::Utils::Logger qw(:logger);
$options ||= {};
# loop through list of URLs / session URLs
- # see if we've already tested the url, if so copy the status info / redirect_to info and move on
+ # 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
- # Avoid testing URLs having the same domain sequentially
+ # TODO: Avoid testing URLs having the same domain sequentially
my $e = new_editor(authtoken => $auth, xact => 1);
return $e->die_event unless $e->checkauth;
my $num_processed = 0; # total number processed, including redirects
my $resp_window = 1;
+ # before we start the real work, let the caller know
+ # the attempt (id) so recovery is possible.
+
+ $client->respond({
+ url_count => $url_count,
+ total_processed => $num_processed,
+ attempt => $attempt
+ });
+
my $multises = OpenSRF::MultiSession->new(
app => 'open-ils.url_verify', # hey, that's us!
=cut
-sub validate_url {
+sub verify_url {
my ($self, $client, $auth, $attempt_id, $url_id) = @_;
my %seen_urls;
$seen_urls{$cur_url->url} = $cur_url;
- my $url_resp = validate_one_url($e, $attempt, $cur_url, $timeout);
+ my $url_resp = verify_one_url($e, $attempt, $cur_url, $timeout);
# something tragic happened
return $url_resp if $U->is_event($url_resp);
=cut
-sub validate_one_url {
+sub verify_one_url {
my ($e, $attempt, $url, $timeout) = @_;
my $url_text = $url->url;
}
-
-
1;