Changeset 17549
- Timestamp:
- 2008-10-15T19:53:39+13:00 (16 years ago)
- Location:
- gsdl/trunk/perllib/downloaders
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/downloaders/OAIDownload.pm
r17207 r17549 209 209 return; 210 210 } 211 if ($self->{'forced_quit'}) { 212 return $strIDs; 213 } 211 214 212 215 print STDERR "<<Download Information>>\n"; … … 226 229 227 230 $strIDs = $self->useWget($cmdWget); 231 if ($self->{'forced_quit'}) { 232 return $accumulated_strIDs; 233 } 228 234 229 235 $self->parse_xml($strIDs); … … 330 336 331 337 my ($stdout_and_err2,$error2,$follow2) = $self->useWgetMonitored($wget_cmd2); 338 return $strRecord if $self->{'forced_quit'}; 332 339 333 340 if($error2 ne "") … … 397 404 398 405 my ($stdout_and_err,$errors,$follow) = $self->useWgetMonitored($wget_cmd); 406 return $strRecord if $self->{'forced_quit'}; 399 407 400 408 if($errors ne "") … … 411 419 if (!$had_valid_url) 412 420 { 413 print STDERR "\tNo sou ce document URL is specified in the OAI record (No (dc:)?identifier is provided)\n";421 print STDERR "\tNo source document URL is specified in the OAI record (No (dc:)?identifier is provided)\n"; 414 422 } 415 423 } 416 424 else 417 425 { 418 print STDERR "\tNo sou ce document URL is specified in the OAI record (No metadata field is provided)\n";426 print STDERR "\tNo source document URL is specified in the OAI record (No metadata field is provided)\n"; 419 427 } 420 428 -
gsdl/trunk/perllib/downloaders/WgetDownload.pm
r17547 r17549 96 96 sub abrupt_end_handler { 97 97 my $termination_signal = shift (@_); 98 98 99 if(defined $childpid) { 99 100 close($chld_out); … … 275 276 if($signal eq "<<STOP>>") { 276 277 print $client "Perl received STOP signal (on port $port): stopping wget\n"; 277 $loop = 0; 278 $loop = 0; # out of outer while loop 279 $self->{'forced_quit'} = 1; # subclasses need to know we're quitting 278 280 279 281 # Sometimes the wget process takes some time to start up. If the STOP signal … … 301 303 } 302 304 } 303 last; # we're done here305 last; # out of foreach loop 304 306 } 305 307 } … … 423 425 if($signal eq "<<STOP>>") { 424 426 print $client "Perl received STOP signal (on port $port): stopping wget\n"; 425 $loop = 0; 427 $loop = 0; # out of outer while loop 428 $self->{'forced_quit'} = 1; # subclasses need to know we're quitting 426 429 427 430 # Sometimes the wget process takes some time to start up. If the STOP signal … … 449 452 } 450 453 } 451 last; # we're done here454 last; # out of foreach loop 452 455 } 453 456 }
Note:
See TracChangeset
for help on using the changeset viewer.