IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 10, 2015, 12:40:44 PM (11 years ago)
Author:
eugene
Message:

make code less forgiving: sql execute aborts on failures; deal with various hidden problems: add IF EXISTS to drop table operations to avoid raising unneeded error, make sure tables exist before trying to add indexes, test for existence of the stack _xsrc, _xfit, etc tables (and skip if missing); fix sqlLine.group to cast inputs to string before performing string ops; getKeyFloat now returns a float value which is safe with sqlLine.group, but can be used in a math expression; use python math. operators as needed (sqrt, fabs); fulltest.sh runs for camera, stack, object stages; update dvoSkyTable to use REGION_ID instead of special word INDEX; add existsClient method (avoid using mysql failure as a test for table existence); no need to test for exceptions to sql.execute since we abort on failure; replace esoteric SQL with dropTable calls; trap errors in stilts.treads in setupScratchdb; drop StackObjecThin and StackDetOffMeta along with other stack scratch tables

File:
1 edited

Legend:

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

    r35178 r38837  
    8888        self.logger.infoPair("Installing", "initialization tables")
    8989        tablepath = self.config.configDir + "tables.IN.vot"
    90         tables = stilts.treads(tablepath)
     90        try:
     91            tables = stilts.treads(tablepath)
     92        except Exception, e:
     93            print "--- problem reading tables.IN.vot"
     94            print "--- " + str(e)
     95            os._exit(3)
    9196
    9297        for table in tables:
     
    9499            self.logger.infoPair("Creating IN table: ", table.name)
    95100            self.logger.debug("Creating IN table: " + table.name)
    96             table.write(self.scratchDb.url + '#' + table.name)
     101            try: table.write(self.scratchDb.url + '#' + table.name)
     102            except Exception, e: print "--- " + str(e)
    97103
    98104        # create basic DVO tables
Note: See TracChangeset for help on using the changeset viewer.