Changeset 31856
- Timestamp:
- 2017-08-07T19:09:21+12:00 (6 years ago)
- Location:
- main/trunk/greenstone2/perllib/downloaders
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/downloaders/WebDownload.pm
r31853 r31856 115 115 } 116 116 #my $cmdWget = "-N -k -x -t 2 -P \"".$hashGeneralOptions->{"cache_dir"}."\" $strWgetOptions $strOptions ".$self->{'url'}; 117 my $cmdWget = "-N -k -x - t 2 $strWgetOptions $strOptions $cache_dir " .$self->{'url'};117 my $cmdWget = "-N -k -x --tries=2 $strWgetOptions $strOptions $cache_dir " .$self->{'url'}; 118 118 119 119 #print STDOUT "\n@@@@ RUNNING WGET CMD: $cmdWget\n\n"; … … 188 188 my $strOptions = $self->getWgetOptions(); 189 189 190 my $strBaseCMD = $strOptions." - q -O - \"$self->{'url'}\"";190 my $strBaseCMD = $strOptions." --tries=2 -q -O - \"$self->{'url'}\""; 191 191 192 192 … … 194 194 195 195 if (!defined $strIdentifyText or $strIdentifyText eq "" ){ 196 print STDERR "Server information is unavailable.\n"; 197 print STDERR "<<Finished>>\n"; 196 print STDERR "Server information is unavailable.\n"; 197 if ($self->{'proxy_on'} && $self->{'proxy_host'} && $self->{'proxy_port'}) { # if proxying set, the settings may be wrong 198 print STDERR "Current proxy settings are:\n"; 199 print STDERR "- host=$self->{'proxy_host'}\n"; 200 print STDERR "- port=$self->{'proxy_port'}\n"; 201 } else { # else no proxy set, the user may need proxy settings 202 prin STDERR "The external server might not be responding, or you might need to switch on proxy settings.\n"; 203 } 204 print STDERR "<<Finished>>\n"; 198 205 return; 199 206 } -
main/trunk/greenstone2/perllib/downloaders/WgetDownload.pm
r31851 r31856 263 263 # closing an extra unused handle, a single handle is used instead for both the child's 264 264 # stderr and stdout. 265 # See http://blog.0x1fff.com/2009/09/howto-execute-system-commands-in-perl.html 266 # for why this is the right thing to do. 265 267 266 268 # Both open2 and open3 don't return on failure, but raise an exception. The handling … … 284 286 } 285 287 $strReadIn .= $strLine; 286 } 288 } 287 289 else { # wget finished, terminate naturally 288 290 #print STDOUT "\nPerl: open2 command, input stream closed. Wget terminated naturally.\n";
Note:
See TracChangeset
for help on using the changeset viewer.