Changeset 36072 for branches/eam_branches/ipp-20130711/ippToPsps
- Timestamp:
- Aug 30, 2013, 4:52:14 PM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130711/ippToPsps
- Files:
-
- 7 edited
- 2 copied
-
. (modified) (1 prop)
-
config/changes.txt (copied) (copied from trunk/ippToPsps/config/changes.txt )
-
config/ippToPspsDbSchema.sql (modified) (1 diff)
-
jython/Makefile.am (modified) (1 diff)
-
jython/detectionbatch.py (modified) (1 diff)
-
jython/gpc1db.py (modified) (2 diffs)
-
jython/ipptopspsdb.py (modified) (2 diffs)
-
jython/queue.py (modified) (1 diff)
-
jython/removepending.py (copied) (copied from trunk/ippToPsps/jython/removepending.py )
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130711/ippToPsps
- Property svn:mergeinfo changed
/trunk/ippToPsps (added) merged: 35994
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20130711/ippToPsps/config/ippToPspsDbSchema.sql
r35502 r36072 127 127 `active` tinyint(1) default '1', 128 128 `parallel` tinyint(1) default '0', 129 `P2_smf_version` varchar(16) default NULL, 130 `ST_cmf_version` varchar(16) default NULL, 129 131 UNIQUE KEY `name` (`name`) 130 132 ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -
branches/eam_branches/ipp-20130711/ippToPsps/jython/Makefile.am
r35097 r36072 30 30 pslogger.py \ 31 31 queue.py \ 32 removepending.py \ 32 33 scratchdb.py \ 33 34 setupScratchDb.py \ -
branches/eam_branches/ipp-20130711/ippToPsps/jython/detectionbatch.py
r35605 r36072 54 54 batchID, 55 55 "P2", 56 gpc1Db.getCameraStageSmf(camID ),56 gpc1Db.getCameraStageSmf(camID,skychunk.P2_smf_version), 57 57 useFullTables) 58 58 -
branches/eam_branches/ipp-20130711/ippToPsps/jython/gpc1db.py
r35417 r36072 212 212 Gets a camera-stage smf for this cam_id 213 213 ''' 214 def getCameraStageSmf(self, camID ):215 214 def getCameraStageSmf(self, camID, smfversion): 215 self.logger.infoPair("using", smfversion) 216 216 self.logger.debug("Querying GPC1 for camera smf files with cam_id = " + str(camID)) 217 217 … … 237 237 # list all smf files if a neb path 238 238 files = [] 239 if path.startswith("neb"): 240 241 # XXX EAM : this should just use the name (path.smf) instead of a wildcard, right? 242 f=os.popen("neb-ls -p "+path+"%smf") 243 for i in f.readlines(): 244 files.append(i.rstrip()) 245 246 # or not a neb path 247 else: 248 files = glob.glob(path + ".smf") 239 240 241 #there are a couple of states for smfversion 242 243 # "use_new" => we have reprocessed the data, use the .smf file 244 245 # "not_reproc" => this has not been reprocessed, use the .smf file 246 247 # "use_original" => we *may* have reprocessed the data, 248 # use (file).smf.original if camRun.state = 'full' and if there is a .smf and .orig 249 # use (file).smf if camRun.state = 'full' and if there is only a .smf 250 # fault out if camRun.state != 'full' -- that is a race condition we don't want. 251 252 253 if (smfversion == "not_reproc") or (smfversion == "use_new"): 254 if path.startswith("neb"): 255 256 # XXX EAM : this should just use the name (path.smf) instead of a wildcard, right? 257 f=os.popen("neb-ls -p "+path+"%smf") 258 for i in f.readlines(): 259 files.append(i.rstrip()) 260 261 # or not a neb path 262 else: 263 files = glob.glob(path + ".smf") 264 265 if (smfversion == "use_original"): 266 # get state of camRun 267 sql = "SELECT state \ 268 FROM camProcessedExp \ 269 JOIN camRun USING(cam_id) \ 270 WHERE camRun.cam_id = %d" % camID 271 try: 272 rs = self.executeQuery(sql) 273 rs.first() 274 except: 275 self.logger.errorPair("Can't query for camRun.state for cam_id", str(camID)) 276 return None 277 278 try: 279 # get state of camRun.cam_id 280 camrunstate = rs.getString(1) 281 except: 282 self.logger.errorPair("No state found for cam_id", str(camID) ) 283 return None 284 285 if (camrunstate == "full"): 286 self.logger.infoPair("camRun.state is ",camrunstate) 287 # if full find smf files 288 if path.startswith("neb"): 289 290 # XXX EAM : this should just use the name (path.smf) instead of a wildcard, right? 291 fsmf=os.popen("neb-ls -p "+path+"%smf") 292 fsmfs = fsmf.readlines() 293 fsmforig=os.popen("neb-ls -p "+path+"%smf.original") 294 fsmforigs = fsmforig.readlines() 295 smfCount = len(fsmfs) 296 smfOrigCount = len (fsmforigs) 297 298 if (smfCount > 0 and smfOrigCount > 0): 299 #smf and original so use original 300 self.logger.infoPair("using:", path+"%smf.original") 301 for i in fsmforigs: 302 files.append(i.rstrip()) 303 304 if (smfCount > 0 and smfOrigCount == 0): 305 self.logger.infoPair("using:", path+"%smf") 306 #smf file and no smf.original use .smf 307 for i in fsmfs: 308 files.append(i.rstrip()) 309 310 #if not smf dont' find files ??) 311 # or not a neb path 312 313 else: 314 # this is broken for non neb - on the other hand we probably won't do .original if so 315 files = glob.glob(path + ".smf") 316 317 318 319 # if .smf and .original use .original 320 else: 321 self.logger.infoPair("camRun.state not full, can't ingest", str(camID) ) 322 return None 323 249 324 250 325 # XXX EAM : test output -
branches/eam_branches/ipp-20130711/ippToPsps/jython/ipptopspsdb.py
r35605 r36072 1109 1109 ,queue_OB \ 1110 1110 ,parallel \ 1111 ,P2_smf_version \ 1112 ,ST_cmf_version \ 1111 1113 FROM skychunk \ 1112 1114 WHERE name = '" + self.skychunk.name + "'" … … 1155 1157 1156 1158 if rs.getInt(22) == 1: self.skychunk.parallel = True 1159 self.skychunk.P2_smf_version = rs.getString(23) 1160 self.skychunk.ST_cmf_version = rs.getString(24) 1157 1161 1158 1162 if self.skychunk.parallel: print "USING parallel" -
branches/eam_branches/ipp-20130711/ippToPsps/jython/queue.py
r35656 r36072 71 71 for batchType in self.skychunk.batchTypes: 72 72 self.logger.infoPair("BatchType",batchType) 73 # self.logger.infoTitle("Previous failed datastore loads")74 # self.publishAnyUnpublishedBatches(batchType)73 #self.logger.infoTitle("Previous failed datastore loads") 74 #self.publishAnyUnpublishedBatches(batchType) 75 75 76 76 # get totals for whole area to check if there is anything to do
Note:
See TracChangeset
for help on using the changeset viewer.
