IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35073


Ignore:
Timestamp:
Jan 29, 2013, 6:10:56 AM (13 years ago)
Author:
eugene
Message:

adding some notes to setupScratchDb

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121219/ippToPsps/jython/setupScratchDb.py

    r35063 r35073  
    1414'''
    1515class SetupScratchDb(IppToPsps):
     16
     17    ## XXX note that setupScratchDb.py fails if there are no valid
     18    ## entries in the config table (or if it is passed a non-existent
     19    ## config) This is because ipptopsps.__init__ calls
     20    ## checkClientStatus, which calls refreshConfig, which calls
     21    ## readConfig, which attempts to select the matching entry from
     22    ## the config table.  if the select returns 0 rows, the code
     23    ## crashes.  even if it were not to crash (eg, if it returned
     24    ## False), checkClientStatus would enter a waiting loop until the
     25    ## config existed.
     26   
     27    ## since a scratchDb is needed to do basically anything, it seems
     28    ## like 'setupScratchDb' should not be dependent on the details of
     29    ## the configs, etc.
     30
     31    ## what are the options?  I think this is a problem of poor
     32    ## factoring / dependencies, esp for 'config.py'.  there are two
     33    ## (or more) aspects to 'config.py' : management of the dynamic
     34    ## 'config' information (basically, the regions / dvodbs of
     35    ## interest) and manipulation of the static / system configuration
     36    ## information.
     37
     38    ## these concepts should probably be split and the more general
     39    ## part (settings & logger) placed in one module and the rest elsewhere.
     40
     41    ## as for setupScratchDb.py, it looks like it only uses the static
     42    ## settings info and the logger functions, so it should not be a
     43    ## child of the ipptopsps class
    1644
    1745    '''
Note: See TracChangeset for help on using the changeset viewer.