Changeset 32118 for trunk/ippToPsps/jython/batch.py
- Timestamp:
- Aug 17, 2011, 12:37:27 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/batch.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/batch.py
r32091 r32118 11 11 from subprocess import call, PIPE, Popen 12 12 13 from datastore import Datastore14 13 from scratchdb import ScratchDb 15 14 from gpc1db import Gpc1Db … … 97 96 98 97 # get local storage location from config 99 self.batchName = "B%08d" % self.batchID 100 self.subDir = self.doc.find("localOutPath").text + "/" + self.batchType + "/" + dvoGpc1Label 101 self.localOutPath = self.subDir + "/" + self.batchName 98 self.batchName = Batch.getNameFromID(self.batchID) 99 basePath = self.doc.find("localOutPath").text 100 self.subDir = Batch.getSubDir( 101 basePath, 102 self.batchType, 103 dvoGpc1Label) 104 105 self.localOutPath = Batch.getOutputPath( 106 basePath, 107 self.batchType, 108 dvoGpc1Label, 109 self.batchID) 110 102 111 if not os.path.exists(self.localOutPath): os.makedirs(self.localOutPath) 103 112 … … 125 134 126 135 self.everythingOK = True 136 137 ''' 138 Static method to generated batch name from batch ID 139 ''' 140 @staticmethod 141 def getNameFromID(id): 142 return "B%08d" % id 143 144 ''' 145 Static method to generated sub directory for batch on local disk 146 ''' 147 @staticmethod 148 def getSubDir(basePath, batchType, dvoLabel): 149 return basePath + "/" + batchType + "/" + dvoLabel 150 151 ''' 152 Static method to generated output path for batch 153 ''' 154 @staticmethod 155 def getOutputPath(basePath, batchType, dvoLabel, id): 156 return Batch.getSubDir(basePath, batchType, dvoLabel) + "/" + Batch.getNameFromID(id) 127 157 128 158 ''' … … 448 478 self.logger.infoPair("Batch......", "complete") 449 479 450 480 from datastore import Datastore 481
Note:
See TracChangeset
for help on using the changeset viewer.
