Changeset 30522

Show
Ignore:
Timestamp:
10.05.2016 14:39:41 (4 years ago)
Author:
ak19
Message:

Dr Bainbridge found a better place to instantiate the activate.pm object (hereafter to be renamed to servercontrol.pm).

Location:
main/trunk/greenstone2/perllib
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/activate.pm

    r30520 r30522  
    4343use parse2; 
    4444 
    45 #use enum; 
    46 # enumerations in perl, http://stackoverflow.com/questions/473666/does-perl-have-an-enumeration-type 
    47 # Unfortunately, not part of perl's core 
    48 #use enum qw(LEVEL_NONE LEVEL_ERROR LEVEL_INFO LEVEL_DEBUG); # debugging levels NONE == 0, ERROR=1 INFO=2 DEBUG=3 
    49  
    5045 
    5146sub new 
  • main/trunk/greenstone2/perllib/buildcolutils.pm

    r30520 r30522  
    676676    map { local $_=$_; $_->build_indexes($indexname, $indexlevel); } @builders; 
    677677 
     678    # Need to deactivate the collection for collections whose db don't support concurrent R+W 
     679    # All except the collection (1st parameter) can be empty. For GS3, also set the site parameter 
     680    my $gsserver = new activate( $self->get_collection(), $self->{'site'}, $self->{'verbosity'}, $self->{'builddir'}, $self->{'indexdir'}, $self->{'collectdir'}, $self->{'library_url'}, $self->{'library_name'}); 
     681 
    678682    # when incrementally rebuilding a collection using any db that doesn't support concurrent 
    679683    # read and write (e.g. gdbm), need to deactivate the collection before make_infodatabase()     
     
    686690     
    687691        if(!$dbSupportsConcurrentRW) { 
    688         # all except the collection (1st parameter) can be empty. For GS3, also set the site parameter 
    689         my $gsserver = new activate( $self->get_collection(), $self->{'site'}, $self->{'verbosity'}, $self->{'builddir'}, $self->{'indexdir'}, $self->{'collectdir'}, $self->{'library_url'}, $self->{'library_name'}); 
    690692        $gsserver->print_task_msg("About to deactivate collection ".$self->get_collection()); 
    691         #$self->{'library_url'} = $gsserver->get_library_URL(); 
    692693        $gsserver->do_deactivate();      
    693694        } 
     
    720721     
    721722        if(!$dbSupportsConcurrentRW) { 
    722         # all except the collection (1st parameter) can be empty. For GS3, also set the site parameter 
    723         my $gsserver = new activate( $self->get_collection(), $self->{'site'}, $self->{'verbosity'}, $self->{'builddir'}, $self->{'indexdir'}, $self->{'collectdir'}, $self->{'library_url'}, $self->{'library_name'}); 
    724723        $gsserver->print_task_msg("About to deactivate collection ".$self->get_collection()); 
    725         #$self->{'library_url'} = $gsserver->get_library_URL(); 
    726724        $gsserver->do_deactivate(); 
    727725        }