- Timestamp:
- 2019-03-11T20:08:39+13:00 (5 years ago)
- Location:
- main/trunk/greenstone3/src/java/org/greenstone/gsdl3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/build/GS2PerlConstructor.java
r32855 r32892 406 406 407 407 // If you want to run a Perl command without doing GS2PerlConstructor's custom logging in the build log 408 // The use the runSimplePerlCommand() versions, which use the default behaviour of running a SafeProcess408 // Then use the runSimplePerlCommand() versions, which use the default behaviour of running a SafeProcess 409 409 protected boolean runSimplePerlCommand(String[] command) { 410 410 return runSimplePerlCommand(command, null, null); … … 532 532 533 533 if (perlProcess.getExitValue() == 0) { //status = OK; 534 534 //logger.info("@@@@@@@@ runPerlCommand success - exitvalue = " + perlProcess.getExitValue()); 535 535 sendProcessStatus(new ConstructionEvent(this, GSStatus.CONTINUING, "Success")); 536 536 success = true; 537 537 538 538 } else { //status = ERROR; 539 logger.debug("@@@@@@@@ runPerlCommand failed, exitvalue = " + perlProcess.getExitValue()); 539 540 sendProcessStatus(new ConstructionEvent(this, GSStatus.ERROR, "Failure")); 540 541 success = false; -
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/OAIReceptionist.java
r32870 r32892 81 81 protected boolean noRecordsMatch = false; 82 82 83 /** A set of all known 'sets' TODO: set_oaiset as name*/83 /** A set of all known 'sets'. */ 84 84 protected HashSet<String> set_oaiset = null; 85 85 -
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/GS2Construct.java
r32453 r32892 401 401 String statusString = GSXML.getNodeText(statusElem); 402 402 statusString += " and monitored until done."; 403 // check for errors 404 int status_code = Integer.parseInt(statusElem.getAttribute(GSXML.STATUS_ERROR_CODE_ATT)); 405 if (GSStatus.isError(status_code)) { 406 logger.info("Got error status code: " + status_code); 407 statusString += "But got error status code: " + status_code; 408 } else { // check for Construction event errors 409 String id = statusElem.getAttribute("pid"); 410 GS2PerlListener currentListener = this.listeners.get(id); 411 status_code = currentListener.getStatus(); 412 if (GSStatus.isError(status_code)) 413 { 414 logger.info("xxxx Got construction event error. Error status code: " + status_code); 415 statusString += "But got construction event error, status code: " + status_code; 416 // add the rest of the messages to the statusElem node 417 statusString += "\n" + currentListener.getUpdate(); 418 statusElem.setAttribute(GSXML.STATUS_ERROR_CODE_ATT, Integer.toString(currentListener.getStatus())); 419 } 420 } 421 // can finally set statusString 403 422 GSXML.setNodeText(statusElem, statusString); 404 423 -
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSStatus.java
r16869 r32892 24 24 public static final int SUCCESS = 1; // request succeeded 25 25 public static final int ACCEPTED = 2; // request accepted but not completed 26 public static final int ERROR = 3; // error and process stopped 26 public static final int ERROR = 3; // error and process stopped. BEWARE: If you change the value of ERROR, concurrently update the value checked for in documentedit_scripts_util.js::hadErrorResponseOnSave() 27 27 28 28 // responses for status requests
Note:
See TracChangeset
for help on using the changeset viewer.