Changeset 7391 for TI01-discovery-Ingest


Ignore:
Timestamp:
27/08/10 14:33:59 (9 years ago)
Author:
sdonegan
Message:

Records ingest start and end time now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery-Ingest/trunk/v4.3.0/ingestAutomation-upgrade/OAIBatch/abstractdocumentingester.py

    r7362 r7391  
    766766                ''' 
    767767                 
     768                self.thisIngestStartDate = str(datetime.datetime.now()) 
    768769                 
    769770                numfilesproc,badXmlFiles = self._convertIngestFiles(self.originals_dir, self.discovery_dir, format) 
     
    844845                 
    845846                #Update log file details op on ingest to s atring which is THEN wrtten to a file, so as can return and email for info editor 
    846                 self.thisIngestDate = str(datetime.datetime.now()) 
     847                self.thisIngestEndDate = str(datetime.datetime.now()) 
    847848                 
    848849                message = "Ingest report for data centre: " + datacentre + "\n" 
    849                 message = message + "Ingest date: " + self.thisIngestDate + "\n" 
     850                message = message + "Ingest date: " + self.thisIngestEndDate + "\n" 
    850851                message = message + "Original metadata directory: " + self._harvest_home + "\n\n" 
    851852                message = message + "TOTAL_NUMBER_OF_FILES " + str(numfilesproc+badXmlFiles) + "\n" 
     
    875876                        logging.info("Updating ingest logging database") 
    876877                                                 
    877                         sqlLoggingCmd = "select add_ingest_stats(%s,'%s','%s','%s','%s','%s','%s','%s','%s');"%(self.ingestProcessID,self.thisIngestDate,numfilesproc+badXmlFiles,numfilesproc,badXmlFiles,self._no_files_ingested,self._no_files_changed,self._no_files_deleted,self._no_problem_files) 
     878                        sqlLoggingCmd = "select add_ingest_stats(%s,'%s','%s','%s','%s','%s','%s','%s','%s','%s');"%(self.ingestProcessID,self.thisIngestStartDate,self.thisIngestEndDate,numfilesproc+badXmlFiles,numfilesproc,badXmlFiles,self._no_files_ingested,self._no_files_changed,self._no_files_deleted,self._no_problem_files) 
    878879                                         
    879880                        #update ingestLogging                    
Note: See TracChangeset for help on using the changeset viewer.