Changeset 5602 for TI01-discovery


Ignore:
Timestamp:
11/08/09 16:31:57 (10 years ago)
Author:
sdonegan
Message:

Debugged ATOM feed ingestion to deal with revised eXist atom architecture -sorted reporting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/branches/ingestAutomation-upgrade/OAIBatch/feeddocumentingester.py

    r5600 r5602  
    127127                        FileUtilities.createFile(difFilename, doc)                               
    128128                        numfilesproc, processingReport = self._convertAndIngestFiles(self.originals_dir, self.discovery_dir, self.dataCentre, False)                             
    129                         self.record.append(str(time.asctime()) + " Successfully obtained " + no.localID + " and ingested (" + str(numfilesproc) + ") document") 
    130                          
     129                         
     130                        if numfilesproc != 0: 
     131                                reportLine = " Successfully obtained " + no.localID + "from feed and ingested document into database" 
     132                        else: 
     133                                reportLine = " Could NOT obtain " + no.localID + "from feed ! (check eXist ATOM feed...?)" 
     134                                                 
    131135                except: 
    132                         self.record.append(str(time.asctime()) + " Could not ingest: " + difFilename + " (id = " + no.localID + " )")    
     136                        reportLine =  " Error encountered : " + difFilename + " from feed (id = " + no.localID + " )" 
     137                         
    133138                        logging.error(str(time.asctime()) + " Could not ingest: " + difFilename + " (id = " + no.localID + " )" ) 
    134139                         
    135                                          
    136                 #self.summaryFile.write(self.summaryLine) 
    137                  
    138                 #for feed ingester, just log report OP 
    139                 logging.info("----------------------------------------------------------------") 
     140                 
     141                self.record.append(str(time.asctime()) + reportLine) 
     142                         
     143                 
     144                logging.info("---------------------------------------------------------------------------------------------------") 
    140145                #logging.info(processingReport)       # dont need this  
    141                 logging.info("Document " + no.localID + " fully ingested into discovery service") 
    142                 logging.info("----------------------------------------------------------------") 
     146                logging.info("Document " + no.localID) 
     147                logging.info("(report: " + reportLine + ")") 
     148                logging.info("---------------------------------------------------------------------------------------------------") 
    143149                 
    144150                #return record list of transactions 
Note: See TracChangeset for help on using the changeset viewer.