Changeset 37592 for trunk/ippToPsps/jython/forcedwarpbatch.py
- Timestamp:
- Nov 12, 2014, 2:58:40 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/forcedwarpbatch.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/forcedwarpbatch.py
r37577 r37592 224 224 self.generateRandomIDs() 225 225 226 self.generateUniquePspsIDs() 227 226 228 # add indexes ForcedWarpMeasurement 227 229 self.scratchDb.createIndex("ForcedWarpMeasurement", "objID") … … 249 251 self.tablesToExport.append("ForcedWarpExtended") 250 252 253 # get dvo ids, 254 # add in the psps unique ids from stuff 251 255 252 256 ''' … … 326 330 327 331 def generateRandomIDs(self): 328 sql = "UPDATE ForcedWarpMeasurement set randomWarpID = FLOOR(RAND("+str(self.batchID)+")*9223372036854775807)" ;332 sql = "UPDATE ForcedWarpMeasurement set randomWarpID = FLOOR(RAND("+str(self.batchID)+")*9223372036854775807)" 329 333 try: self.scratchDb.execute(sql) 330 334 except: … … 333 337 334 338 335 339 ''' 340 Updates table and generates pspsuniqueids 341 ''' 342 343 def generatePspsUniqueIDs(self): 344 sql = "UPDATE ForcedWarpMeasurement join (select @r:=@r+1 rownum, objID from \ 345 (select @r:=0) r, ForcedWarpMeasurement t) as foo using (objID) set \ 346 uniquePspsFWid = ((" +str(self.batchID)+ "*1000000000 ) + rownum)" 347 try: self.scratchDb.execute(sql) 348 except: 349 self.logger.errorPair('failed sql',sql) 350 return 351 336 352 337 353
Note:
See TracChangeset
for help on using the changeset viewer.
