IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39661


Ignore:
Timestamp:
Aug 23, 2016, 2:34:33 PM (10 years ago)
Author:
heather
Message:

fix for retries of smf/cmf files, unk what the object batch fix is, but it's clearly something that was used...

Location:
trunk/ippToPsps/jython
Files:
2 edited

Legend:

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

    r39303 r39661  
    55import shutil
    66import hashlib
     7import time
    78from subprocess import call, PIPE, Popen
    89
     
    2021    '''
    2122    def __init__(self, logger, config, originalPath):
    22 
    2323       # set class variables
    2424       self.originalPath = originalPath
     
    2727       self.header = None
    2828
     29       numtries = 0
     30       success = 0
     31
     32       while (numtries < 5 and success == 0):
     33           numtries = numtries +1
     34           self.logger.infoPair("Attempting to read file, attempt #",str(numtries))
     35           if os.path.isfile(self.originalPath):
     36               success = 1
     37               self.logger.infoPair("success to read file", self.originalPath)
     38           else:  #if it fails, wait 30 seconds before looping
     39               time.sleep(30)
     40
     41       if success == 0:
     42           self.logger.errorPair("Cannot read file", self.originalPath)
     43           return           
     44
    2945       # does this file even exist?
    30        if not os.path.isfile(self.originalPath):
    31            self.logger.errorPair("Cannot read file", self.originalPath)
    32            return
     46       #if not os.path.isfile(self.originalPath):
     47        #   self.logger.errorPair("Cannot read file", self.originalPath)
     48         #  return
     49
     50
    3351
    3452       # ok, we have a file, now copy it locally to save on NFS overhead
  • trunk/ippToPsps/jython/objectbatch.py

    r39565 r39661  
    318318        sqlLine.group("decMeanErr",      "DEC_ERR")
    319319        sqlLine.group("posMeanChisq",    "CHISQ_POS")
    320         sqlLine.group("nStackObjectRows", "'0'") # XXX I need to add / define this in dvopsps
     320        sqlLine.group("nStackObjectRows", "'-999'") # XXX I need to add / define this in dvopsps # HAF set to -999 as required for pv3
    321321        sqlLine.group("nStackDetections", "'0'")
    322322        sqlLine.group("nDetections",      "'0'")
Note: See TracChangeset for help on using the changeset viewer.