- Timestamp:
- Jan 11, 2012, 11:19:21 PM (15 years ago)
- Location:
- branches/meh_branches/ppsub_test
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippToPsps/jython/odm.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppsub_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppsub_test/ippToPsps/jython/odm.py
r32120 r33098 2 2 3 3 import re 4 import os 5 import signal 4 6 import sys 5 7 import tempfile … … 33 35 p = Popen("../perl/checkOdmStatus.pl -b " + batch + " -f " + tempFile.name, 34 36 shell=True, 35 stdout=PIPE) 37 stdout=PIPE, 38 close_fds=True) 36 39 p.wait() 37 40 38 41 if p.returncode != 0: 39 42 self.logger.debugPair("ODM polling", "failed") … … 45 48 46 49 tempFile.close() 50 p.stdout.close() 51 47 52 48 53 if not ret: self.logger.debugPair("Cannot read ODM file for batch", "%d" % batchID) … … 66 71 STATE = doc.find("{%s}OdmBatchState/{%s}BatchState" % (NAMESPACE, NAMESPACE)).text 67 72 MESSAGE = doc.find("{%s}OdmBatchState/{%s}Message" % (NAMESPACE, NAMESPACE)).text 73 results['MESSAGE'] = MESSAGE 74 results['DETAILS'] = "None" 68 75 69 if re.search("failed", STATE): loadFailed = 1 70 if re.search("MergeWorthy", MESSAGE): mergeWorthy = 1 71 if re.search("Merge[1-9]Completed", MESSAGE): merged = 1 72 if mergeWorthy or merged or loadFailed: loadedToODM = 1 76 # we assume that batches 'OnHold' are failed as it is very rare for such 77 # batches to have there state changed 78 if re.search("failed", STATE) or re.search("OnHold", MESSAGE): 79 loadedToODM = 1 80 loadFailed = 1 81 DETAILS = doc.find("{%s}OdmBatchState/{%s}Details" % (NAMESPACE, NAMESPACE)).text 82 results['DETAILS'] = DETAILS 83 if re.search("processing", STATE): 84 loadedToODM = 1 85 if re.search("MergeWorthy", MESSAGE): 86 loadedToODM = 1 87 mergeWorthy = 1 88 if re.search("Merge[1-9]Completed", MESSAGE): 89 loadedToODM = 1 90 mergeWorthy = 1 91 merged = 1 73 92 except: 74 93 return 0
Note:
See TracChangeset
for help on using the changeset viewer.
