- Timestamp:
- 2018-11-06T19:26:08+13:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/GreenstoneSQLPlugin.pm
r32577 r32578 250 250 #return undef unless $self->can_process_this_file($file); # NO, DON'T DO THIS (inherited remove_one behaviour) HERE: 251 251 # WE DON'T CARE IF IT'S AN IMAGE FILE THAT WAS DELETED. 252 # WE CARE ABOUT REMOVING THE DOC OID OF THAT IMAGE FILE FROM THE SQL DB252 # WE CARE ABOUT REMOVING THE DOC_OID OF THAT IMAGE FILE FROM THE SQL DB 253 253 # SO DON'T RETURN IF CAN'T_PROCESS_THIS_FILE 254 254 … … 430 430 }); 431 431 432 # try connecting to the mysql db, if that fails it will die432 # try connecting to the mysql db, die if that fails 433 433 if(!$gs_sql->connect_to_db({ 434 434 'db_driver' => $self->{'db_driver'}, … … 452 452 # This is fatal for the plugout, let's terminate here after disconnecting again 453 453 # PrintError would already have displayed the warning message on load fail 454 $gs_sql->disconnect_from_db() 455 || warn("Unable to disconnect from database.\n"); 454 $gs_sql->force_disconnect_from_db(); 456 455 die("Could not use db $db_name. Can't proceed.\n"); 457 456 } … … 475 474 if($self->{'gs_sql'}) { # only want to work with sql db if buildcol.pl, gs_sql won't have 476 475 # a value except during buildcol, so when processor =~ m/buildproc$/. 477 $self->{'gs_sql'}-> disconnect_from_db()478 || warn("Unable to disconnect from database " . $self->{'site_name'} . "\n"); 479 480 # explicitly delete gs_sql key (setting key to undef has a different meaning from deleting)481 # so all future use has to make the connection again476 $self->{'gs_sql'}->finished(); 477 478 # Clear gs_sql (setting key to undef has a different meaning from deleting: 479 # undef makes key still exist but its value is unded whereas delete deletes the key) 480 # So all future use has to make the connection again 482 481 delete $self->{'gs_sql'}; 483 482 }
Note:
See TracChangeset
for help on using the changeset viewer.