Changeset 35184
- Timestamp:
- Feb 20, 2013, 2:42:35 PM (13 years ago)
- Location:
- trunk/ippToPsps/jython
- Files:
-
- 2 edited
-
ipptopspsdb.py (modified) (2 diffs)
-
loader.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/ipptopspsdb.py
r35183 r35184 1079 1079 Inserts new box into box table. If it already exisits, it returns existing box id 1080 1080 ''' 1081 def isBoxIngested(self, id ):1081 def isBoxIngested(self, id, host): 1082 1082 1083 1083 # set the field 'ingested' to 1 for this box … … 1088 1088 print "no matching boxes for ", str(id) 1089 1089 raise 1090 status = rs.getInt(1)1091 except: 1092 print "failed to set box ", str(id), "as ingested"1090 value = rs.getString(1) 1091 except: 1092 print "failed to find box for ", str(id) 1093 1093 raise 1094 1094 1095 return status 1095 if value == host: 1096 return 1 1097 1098 if value == "none": 1099 return 0 1100 1101 print "box ingested host ", value, " does not match db host ", host 1102 raise 1103 1096 1104 ''' 1097 1105 Inserts new box into box table. If it already exisits, it returns existing box id -
trunk/ippToPsps/jython/loader.py
r35183 r35184 195 195 # need to work out a good boundary / region strategy in coordination with 196 196 # impact of mysql insertion 197 if not self.ippToPspsDb.isBoxIngested(boxId ):197 if not self.ippToPspsDb.isBoxIngested(boxId, self.scratchDb.dbHost): 198 198 self.dvoDetections.nativeIngestDetections(boxId, boxDim['RA'], boxDim['DEC'], boxSize) 199 199
Note:
See TracChangeset
for help on using the changeset viewer.
