Changeset 27107 for main/trunk
- Timestamp:
- 2013-03-21T16:12:41+13:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/build/GS2PerlConstructor.java
r26005 r27107 18 18 import java.util.Vector; 19 19 20 import org.apache.log4j.*; 21 20 22 /** 21 23 * CollectionConstructor class for greenstone 2 compatible building it uses the … … 24 26 public class GS2PerlConstructor extends CollectionConstructor 25 27 { 28 static Logger logger = Logger.getLogger(org.greenstone.gsdl3.build.GS2PerlConstructor.class.getName()); 29 26 30 public static final int NEW = 0; 27 31 public static final int IMPORT = 1; … … 200 204 201 205 // first check that we have a building directory 206 // (don't want to bother running activate.pl otherwise) 202 207 File build_dir = new File(GSFile.collectionBuildDir(this.site_home, this.collection_name)); 203 208 if (!build_dir.exists()) … … 206 211 return; 207 212 } 213 214 /* 208 215 209 216 // move building to index … … 228 235 // success!! - need to send the final completed message 229 236 sendProcessComplete(new ConstructionEvent(this, GSStatus.COMPLETED, "")); 237 */ 238 239 // Running activate.pl instead of making java move building to index as above 240 // circumvents the issue of the jdbm .lg log file (managed by TransactionManager) 241 // in index dir not getting deleted at times. The perl code is able to delete this 242 // sucessfully consistently during testing, whereas java at times is unable to delete it. 243 Vector<String> command = new Vector<String>(); 244 command.add(GlobalProperties.getProperty("perl.path", "perl") + "perl"); 245 command.add("-S"); 246 command.add(GlobalProperties.getGS2Build() + File.separator + "bin" + File.separator + "script" + File.separator + "activate.pl"); 247 command.add("-site"); 248 command.add(this.site_name); 249 command.add("-collectdir"); 250 command.add(GSFile.collectDir(this.site_home)); 251 command.addAll(extractParameters(this.process_params)); 252 command.add(this.collection_name); 253 254 String[] command_str = {}; 255 command_str = command.toArray(command_str); 256 257 if (runPerlCommand(command_str)) 258 { 259 // success!! - need to send the final completed message 260 sendProcessComplete(new ConstructionEvent(this, GSStatus.COMPLETED, "")); 261 }// else an error message has already been sent, do nothing 262 230 263 } 231 264
Note:
See TracChangeset
for help on using the changeset viewer.