Changeset 6093


Ignore:
Timestamp:
07/12/09 15:31:41 (10 years ago)
Author:
sdonegan
Message:

added back in the individual dc reporting - not sure why it was dropped!!

File:
1 edited

Legend:

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

    r6092 r6093  
    5454                logging.info("Continue processing next datacentre config file...") 
    5555                error_counter +=1 
     56 
     57            #summarise harvest info from report doc now produced by ingester program 
     58            recOpFileName = current_dir + "data/" + datacentre + "_ingestSummary.txt" 
     59 
     60            try: 
     61                ingest_report_file = open(recOpFileName, "r") 
     62 
     63                for line in ingest_report_file.readlines(): 
     64                    words  = string.split(line) 
     65                    if len(words) == 0: 
     66                        continue 
     67                    if words[0] == 'PROCESSED': 
     68                        summaryFile.write("Number of processed files: " + words[1] + "\n") 
     69                    if words[0] == 'INGESTED': 
     70                        summaryFile.write("Number of ingested files: " + words[1] + "\n") 
     71                    if words[0] == 'PROBLEM_NUM': 
     72                        summaryFile.write("Number of problem files: " + words[1] + "\n") 
     73                    if words[0] == 'PROBLEM_FILE': 
     74                        summaryFile.write("Problem file name: " + words[1] + "\n") 
     75 
     76                    ingest_report_file.close() 
     77 
     78            except: 
     79                summaryFile.write("Could not extract summary info for " + datacentre + " ingest!!\n") 
    5680             
    5781summaryFile.close() 
Note: See TracChangeset for help on using the changeset viewer.