IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35184


Ignore:
Timestamp:
Feb 20, 2013, 2:42:35 PM (13 years ago)
Author:
eugene
Message:

use scratchdb hostname to indicate ingested state (and by whom)

Location:
trunk/ippToPsps/jython
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/ipptopspsdb.py

    r35183 r35184  
    10791079    Inserts new box into box table. If it already exisits, it returns existing box id
    10801080    '''
    1081     def isBoxIngested(self, id):
     1081    def isBoxIngested(self, id, host):
    10821082
    10831083        # set the field 'ingested' to 1 for this box
     
    10881088                print "no matching boxes for ", str(id)
    10891089                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)
    10931093            raise
    10941094
    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
    10961104    '''
    10971105    Inserts new box into box table. If it already exisits, it returns existing box id
  • trunk/ippToPsps/jython/loader.py

    r35183 r35184  
    195195                            # need to work out a good boundary / region strategy in coordination with
    196196                            # impact of mysql insertion
    197                             if not self.ippToPspsDb.isBoxIngested(boxId):
     197                            if not self.ippToPspsDb.isBoxIngested(boxId, self.scratchDb.dbHost):
    198198                                self.dvoDetections.nativeIngestDetections(boxId, boxDim['RA'], boxDim['DEC'], boxSize)
    199199
Note: See TracChangeset for help on using the changeset viewer.