IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 20, 2013, 9:49:30 AM (13 years ago)
Author:
eugene
Message:

box.ingested value is now the hostname

File:
1 edited

Legend:

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

    r35175 r35183  
    10971097    Inserts new box into box table. If it already exisits, it returns existing box id
    10981098    '''
    1099     def setIngestedBox(self, id):
     1099    def setIngestedBox(self, id, host):
    11001100
    11011101        # set the field 'ingested' to 1 for this box
    1102         sql = "update box set ingested = 1 where id = " + str(id)
     1102        sql = "update box set ingested = '" + host + "' where id = " + str(id)
    11031103        try:
    11041104            self.execute(sql)
     
    11081108
    11091109    '''
    1110     Inserts new box into box table. If it already exisits, it returns existing box id
    1111     '''
    1112     def clearIngestedBoxes(self):
     1110    Clear ingested flag for boxes owned by this host
     1111    '''
     1112    def clearIngestedBoxes(self, host):
    11131113
    11141114        # set the field 'ingested' to 1 for this box
    1115         sql = "update box set ingested = 0"
     1115        sql = "update box set ingested = 'none' where ingested = '" + host + "'"
    11161116        try:
    11171117            self.execute(sql)
    11181118        except:
    1119             print "failed to clear boxes as ingested"
     1119            print "failed to clear ingested state for boxes owned by host ", host
    11201120            raise
    11211121
Note: See TracChangeset for help on using the changeset viewer.