Ignore:
Timestamp:
2008-10-15T19:53:39+13:00 (16 years ago)
Author:
ak19
Message:

Changes to sudden wget download termination when OAIDownload.pm is used: OAIDownload.pm launches wget several times, one after another (after each previous wget instance has terminated). Therefore when the STOP signal is sent from GLI, the OAIDownload.pm script should stop altogether and issue no more calls to wget. This is now accomplished by checking the new member variable self->force_quit which is set to true when WgetDownload receives a STOP signal from GLI.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/downloaders/WgetDownload.pm

    r17547 r17549  
    9696sub abrupt_end_handler {
    9797    my $termination_signal = shift (@_);
     98
    9899    if(defined $childpid) {
    99100    close($chld_out);
     
    275276        if($signal eq "<<STOP>>") {
    276277            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
    278280           
    279281            # Sometimes the wget process takes some time to start up. If the STOP signal
     
    301303            }
    302304            }
    303             last; # we're done here
     305            last;                               # out of foreach loop
    304306        }
    305307        }
     
    423425        if($signal eq "<<STOP>>") {
    424426            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
    426429           
    427430            # Sometimes the wget process takes some time to start up. If the STOP signal
     
    449452            }
    450453            }
    451             last; # we're done here
     454            last;                               # out of foreach loop
    452455        }
    453456        }
Note: See TracChangeset for help on using the changeset viewer.