- Timestamp:
- 2018-11-02T20:51:09+13:00 (5 years ago)
- Location:
- main/trunk/greenstone2/perllib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugin.pm
r32539 r32565 255 255 # use 'archiveinf-src' info database to look up all the OIDs 256 256 # that this file is used in (note in most cases, it's just one OID) 257 258 my $processed_file = 0; # set to 1 if a plugin could process the file and did so successfully 257 259 258 260 my $file_with_placeholders = &util::abspath_to_placeholders($file); … … 264 266 $rv = $plugobj->remove_one($file, $oids, $archivedir); 265 267 if (defined $rv && $rv != -1) { 266 return $rv; 268 #return $rv; 269 $processed_file = 1; 270 last; # break and continue with outer for loop, to process other deleted files 267 271 } # else undefined (was not recognised by the plugin) or there was an error, try the next one 268 272 } 269 return 0; 270 } 271 272 } 273 #return 0; 274 275 if (!$processed_file) { # no plugin could recognise file. 276 # Should we continue processing other deleted files or not? 277 print STDERR "WARNING: plugin::remove_some() failed to process $file with oid(s) ". join(",", $oids) . "\n"; 278 return 0; 279 } # else some plugin processed the current deleted file 280 # continue to process next deleted file 281 282 } 283 return 1; # if we got here, all deleted files got processed successfully 284 } 285 273 286 sub file_block_read { 274 287 my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $gli) = @_; -
main/trunk/greenstone2/perllib/plugins/GreenstoneSQLPlugin.pm
r32563 r32565 228 228 my $gs_sql = $self->{'gs_sql'} || return 0; # couldn't make the connection or no db etc 229 229 if(scalar @$oids > 1) { 230 print STDERR "TODO: We now have reason to optimise GreenstoneSQLPlugin::remove_one() by using prepare and execute.\n";230 print STDERR "TODO: We now have reason to optimise GreenstoneSQLPlugin::remove_one() by using dbi::prepare() + dbi::execute() instead of dbi::do().\n"; 231 231 } 232 232
Note:
See TracChangeset
for help on using the changeset viewer.