Changeset 6891
- Timestamp:
- 26/05/10 11:59:26 (11 years ago)
- Location:
- TI01-discovery-Ingest/trunk/v4n_MEDIN/ingestAutomation-upgrade/OAIBatch
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TI01-discovery-Ingest/trunk/v4n_MEDIN/ingestAutomation-upgrade/OAIBatch/ExtractISO.py
r6875 r6891 23 23 Method to control re-writing of ISO xml with NDG redirect URL's 24 24 ''' 25 def generateNDGredirectURL(self, ndgRedirectURL, xmlOutputFile ):25 def generateNDGredirectURL(self, ndgRedirectURL, xmlOutputFile, changeUrl): 26 26 27 27 logging.info("Generating XML copy with URLS converted to NDG redirect URL's") … … 29 29 self.redirectBaseURL = ndgRedirectURL 30 30 31 rewriteIsoXml = self.changeElementUrlVal(self.isoModel.urlsToChange(), xmlOutputFile) 32 33 34 #sys.exit() 35 31 rewriteIsoXml = self.changeElementUrlVal(self.isoModel.urlsToChange(), xmlOutputFile, changeUrl) 32 36 33 return rewriteIsoXml 37 34 … … 113 110 if self.root is None: 114 111 logging.error("Detected possible problem with input xml - cannot parse it!") 112 self.processingMsg = 'Problem with the XML structure!' 113 self.validDoc = False 115 114 return False 116 115 … … 186 185 187 186 188 self.boundingBoxCoordinates = self.getElementVal(self.isoModel.coordinates()) 187 coords = self.getElementVal(self.isoModel.coordinates()) 188 if coords == 'None': 189 self.boundingBoxCoordinates = None 190 else: 191 self.boundingBoxCoordinates = coords 189 192 190 193 #These are the MEDIN requested extra fields - make optional … … 355 358 ''' 356 359 Method to govern the changing of an element value (in the first instance change a url to a NDG redirect URL 357 ''' 358 def changeElementUrlVal(self,keyMethod,outputFile): 360 361 NOTE: will only change Urls if changeUrl set to True - this method is also used to ready the xml for writing into db 362 363 ''' 364 def changeElementUrlVal(self,keyMethod,outputFile,changeUrl): 359 365 360 366 … … 370 376 371 377 #this is similar to getElementVal - but no interest in ordering or returning the actual value.. 372 for i in dataStruct.keys()[1:]: 373 374 thisData = keyMethod[i][dataStruct[i]] 378 379 #if changeUrl set to true, activate changes, just write xml as is if not 380 if changeUrl: 381 logging.info("changing urls now...") 382 for i in dataStruct.keys()[1:]: 383 384 thisData = keyMethod[i][dataStruct[i]] 375 385 376 #is dicionary a dependant value or straight xpath?377 if 'baseXpath' in thisData.keys():378 logging.info("Extracting xml using COMPLEX dependant method for xpath def: " + str(cnt))379 self.changeDependantURLElementVal(thisData['baseXpath'],thisData['elValXpath'],thisData['depValXpath'],thisData['depVal'])386 #is dicionary a dependant value or straight xpath? 387 if 'baseXpath' in thisData.keys(): 388 logging.info("Extracting xml using COMPLEX dependant method for xpath def: " + str(cnt)) 389 self.changeDependantURLElementVal(thisData['baseXpath'],thisData['elValXpath'],thisData['depValXpath'],thisData['depVal']) 380 390 381 if 'xpath' in thisData.keys(): 382 logging.info("Extracting xml using SIMPLE method for xpath def: " + str(cnt)) 383 self.changeSimpleURLElementVal(thisData['xpath']) 391 if 'xpath' in thisData.keys(): 392 logging.info("Extracting xml using SIMPLE method for xpath def: " + str(cnt)) 393 self.changeSimpleURLElementVal(thisData['xpath']) 394 395 else: 396 logging.info("URL's not set to change!") 384 397 385 398 #having returned the completed xml tree... write it to the OP file dictated.. … … 807 820 808 821 #parse the xml with elementtree 809 self.etree=ET.parse(file) 810 root=self.etree.getroot() # should be the "gmd:MD_Metadata" element 822 try: 823 self.etree=ET.parse(file) 824 root=self.etree.getroot() # should be the "gmd:MD_Metadata" element 825 except: 826 logging.error("File %s appears to be bad XML!" %file) 827 return None 811 828 812 829 #avoid ns0 and ns1 etc etc namespaces when rewriting this ET … … 815 832 if ns != 'None': 816 833 ET._namespace_map[self.isoNameSpaces()[ns]] = ns 817 818 834 819 835 #check root element is an ISO one - use elementtree appended namespace.. -
TI01-discovery-Ingest/trunk/v4n_MEDIN/ingestAutomation-upgrade/OAIBatch/PostgresRecord.py
r6875 r6891 361 361 362 362 SpatialCoords = [] 363 if len(spatialData) == 0: 363 #if len(spatialData) == 0: 364 if spatialData is None: 364 365 logging.info("No spatial coverage elements found - assuming no spatial data available") 365 366 SpatialCoords.append({'west':'null','east':'null','north':'null','south':'null'}) 367 return SpatialCoords 368 366 369 else: 367 370 cntr = 1 -
TI01-discovery-Ingest/trunk/v4n_MEDIN/ingestAutomation-upgrade/OAIBatch/abstractdocumentingester.py
r6875 r6891 195 195 if self.isoDataModel.validDoc is True: 196 196 197 197 198 #record whats attempting to be ingested 198 199 record = PostgresRecord(filename, self._NDG_dataProvider,self._datacentre_groups, self._datacentre_namespace, 199 200 self.isoDataModel,self._xq, self._datacentre_format, self._xqueryConversionsExceptions, 200 201 self._xqueryConversions,self._saxonJarFile, self._xqueryDocTypes, self.originalXMLdoc, self._currentMedinStandard, stubIso = self.isoXML) 201 202 202 203 # Now create the data access object to interface to the DB 203 204 dao = PostgresDAO(record, self.isoDataModel ,self.discovery_dir , pgClient = self.pgc ) … … 303 304 processingConfig['datcentre_configs'] = words[1] 304 305 306 elif words[0] == 'changeURLs': 307 processingConfig['changeURLs'] = words[1] 308 305 309 elif words[0] == 'NDG_redirect_URL': 306 310 processingConfig['NDG_redirect_URL'] = words[1] … … 467 471 @return numfilesproc: counter of number of files processed 468 472 ''' 469 numfilesproc = 0 473 numfilesproc = 0 474 badXMLfiles = 0 470 475 471 476 self.inputFileOrigFinal = {} 477 self.badXMLfileList = {} 472 478 473 479 logging.info(self.lineSeparator) … … 524 530 if isoDataModel.createISOdataStructure() is True: 525 531 logging.info("ISO extractor worked fine!") 532 533 #need to get hold original format XML too (so can put directly into "transformed" docs section... 534 self.originalXMLdoc = '' 535 536 try: 537 logging.info("Extracting original input file into variable for input into original format in transformed docs table") 538 self.originalXMLdoc = file(original_filename).read() 539 540 except: 541 logging.warn("Could not extract original file to local variable!") 542 543 544 #Back to main stream of ISO ingest 545 if self._NDG_dataProvider: 546 547 #to ensure "stubISO" doesnt make it into the filename on system and in the db, use the self. 548 549 #changed so new new NDG3 discovery can pick up Discoveru View URL's correctly? (why should it be different to previous?) 550 new_filename = discovery_dir + self._datacentre_namespace + "__" + format + "__"+ metadataFilename.replace(":", "-")+".xml" 551 new_filename_short = self._datacentre_namespace + "__" + format + "__" + metadataFilename.replace(":", "-")+".xml" 552 553 554 else: 555 ident = isoDataModel.datasetID[0][0] 556 557 ident = ident.replace(":", "-") 558 ident = ident.replace("/", "-") 559 560 new_filename = discovery_dir + "/" +self._datacentre_namespace+ "__"+ format + "__"+ ident +".xml" 561 new_filename_short = self._datacentre_namespace+ "__"+ format + "__"+ ident +".xml" 562 563 564 565 #now create this stub ISO file on system so can access it 566 self.genIsoFile = discovery_dir + new_filename_short 567 568 #FileUtilities.createFile(self.stubIsoFile, self.isoXML) 569 #generate the redirect urls (if set to!) - now we have worked out the full discovery ndg name.. 570 isoDataModel.generateNDGredirectURL(self._ndgRedirectURL,self.genIsoFile,self.changeUrls) 571 572 #create list of all ORIGINAL filenames for ingest reporting (use actual filename) 573 #this links a derived filename in processing dir with original filename 574 #get basic filename from the path+filename passed to this function to use as key 575 self.inputFileOrigFinal[new_filename_short]=filename 576 577 numfilesproc += 1 526 578 527 579 … … 529 581 logging.error ("Something wrong with ISO extractor... (ExtractISO returned False: xml access problem?)") 530 582 #sys.exit() # TODO fix these 531 return583 532 584 else: 533 585 logging.error("Something SERIOUSELY wrong with extractor (couldnt get at ExtractISO class)") 534 #sys.exit() 535 return 586 badXMLfiles += 1 587 self.badXMLfileList[new_filename_short]=filename 588 536 589 except: 537 logging.error("Could not generate ISO XML!") 538 return 539 540 541 #need to get hold original format XML too (so can put directly into "transformed" docs section... 542 self.originalXMLdoc = '' 543 544 try: 545 logging.info("Extracting original input file into variable for input into original format in transformed docs table") 546 self.originalXMLdoc = file(original_filename).read() 547 548 except: 549 logging.warn("Could not extract original file to local variable!") 550 551 552 #Back to main stream of ISO ingest 553 if self._NDG_dataProvider: 554 555 #to ensure "stubISO" doesnt make it into the filename on system and in the db, use the self. 556 557 #changed so new new NDG3 discovery can pick up Discoveru View URL's correctly? (why should it be different to previous?) 558 new_filename = discovery_dir + self._datacentre_namespace + "__" + format + "__"+ metadataFilename.replace(":", "-")+".xml" 559 new_filename_short = self._datacentre_namespace + "__" + format + "__" + metadataFilename.replace(":", "-")+".xml" 560 561 562 else: 563 ident = isoDataModel.datasetID[0][0] 564 565 ident = ident.replace(":", "-") 566 ident = ident.replace("/", "-") 567 568 new_filename = discovery_dir + "/" +self._datacentre_namespace+ "__"+ format + "__"+ ident +".xml" 569 new_filename_short = self._datacentre_namespace+ "__"+ format + "__"+ ident +".xml" 570 571 572 573 #now create this stub ISO file on system so can access it 574 self.genIsoFile = discovery_dir + new_filename_short 575 576 #FileUtilities.createFile(self.stubIsoFile, self.isoXML) 577 #generate the redirect urls - now we have worked out the full discovery ndg name.. 578 579 isoDataModel.generateNDGredirectURL(self._ndgRedirectURL,self.genIsoFile) 580 581 590 logging.error("Could not generate ISO XML from DIF format!!") 591 badXMLfiles += 1 592 self.badXMLfileList[new_filename_short]=filename 593 582 594 583 595 #all other ISO formats/profiles to deal with. … … 593 605 if isoDataModel.createISOdataStructure() is True: 594 606 logging.info("ISO extractor worked fine!") 595 607 608 #Back to main stream of ISO ingest 609 if self._NDG_dataProvider: 610 611 #changed so new new NDG3 discovery can pick up Discoveru View URL's correctly? (why should it be different to previous?) 612 new_filename = discovery_dir + self._datacentre_namespace + "__" + isoFormat + "__"+ metadataFilename.replace(":", "-")+".xml" 613 new_filename_short = self._datacentre_namespace + "__" + isoFormat + "__" + metadataFilename.replace(":", "-")+".xml" 614 615 else: 616 617 ident = isoDataModel.datasetID[0][0] 618 619 ident = ident.replace(":", "-") 620 ident = ident.replace("/", "-") 621 622 new_filename = discovery_dir + "/" +self._datacentre_namespace+ "__"+ isoFormat + "__"+ ident +".xml" 623 new_filename_short = self._datacentre_namespace+ "__"+ isoFormat + "__"+ ident +".xml" 624 625 #now create this stub ISO file on system so can access it 626 self.genIsoFile = discovery_dir + new_filename_short 627 628 #generate the redirect urls (if set to!) - now we have worked out the full discovery ndg name.. 629 isoDataModel.generateNDGredirectURL(self._ndgRedirectURL,self.genIsoFile,self.changeUrls) 630 631 #get the converted ISO into a local var 632 try: 633 logging.info("Extracting converted ISO file into variable for input into original format in transformed docs table") 634 self.isoXML = file(self.genIsoFile).read() 635 self.originalXMLdoc = self.isoXML 636 637 except: 638 logging.warn("Could not extract converted ISO xml to local variable!") 639 self.isoXML = '' 640 641 logging.info("original file = " + original_filename) 642 logging.info("newfile = " + new_filename) 643 644 #create list of all ORIGINAL filenames for ingest reporting (use actual filename) 645 #this links a derived filename in processing dir with original filename 646 #get basic filename from the path+filename passed to this function to use as key 647 self.inputFileOrigFinal[new_filename_short]=filename 648 649 numfilesproc += 1 650 596 651 elif isoDataModel.createISOdataStructure() is True: 597 652 logging.error ("Something wrong with ISO extractor... (ExtractISO returned False: xml access problem?)") 598 653 #sys.exit() # TODO fix these 599 return 600 else: 601 654 655 else: 602 656 logging.error("Something SERIOUSELY wrong with extractor (couldnt get at ExtractISO class)") 603 604 #if this is a simple content problem don't return just yet (will catch it next time round so can include in report! 605 #if isoDataModel.processingMsg != '': 606 # logging.error(" ") 607 # logging.error("Failed with this reported error: %s" %isoDataModel.processingMsg ) 608 # logging.error(" ") 609 610 return 611 612 #Back to main stream of ISO ingest 613 if self._NDG_dataProvider: 614 615 #changed so new new NDG3 discovery can pick up Discoveru View URL's correctly? (why should it be different to previous?) 616 new_filename = discovery_dir + self._datacentre_namespace + "__" + isoFormat + "__"+ metadataFilename.replace(":", "-")+".xml" 617 new_filename_short = self._datacentre_namespace + "__" + isoFormat + "__" + metadataFilename.replace(":", "-")+".xml" 618 619 else: 620 621 ident = isoDataModel.datasetID[0][0] 622 623 ident = ident.replace(":", "-") 624 ident = ident.replace("/", "-") 625 626 new_filename = discovery_dir + "/" +self._datacentre_namespace+ "__"+ isoFormat + "__"+ ident +".xml" 627 new_filename_short = self._datacentre_namespace+ "__"+ isoFormat + "__"+ ident +".xml" 628 629 #now create this stub ISO file on system so can access it 630 self.genIsoFile = discovery_dir + new_filename_short 631 632 #generate the redirect urls - now we have worked out the full discovery ndg name.. 633 isoDataModel.generateNDGredirectURL(self._ndgRedirectURL,self.genIsoFile) 634 635 #get the converted ISO into a local var 636 try: 637 logging.info("Extracting converted ISO file into variable for input into original format in transformed docs table") 638 self.isoXML = file(self.genIsoFile).read() 639 self.originalXMLdoc = self.isoXML 640 641 except: 642 logging.warn("Could not extract converted ISO xml to local variable!") 643 self.isoXML = '' 644 645 logging.info("original file = " + original_filename) 646 logging.info("newfile = " + new_filename) 647 648 #create list of all ORIGINAL filenames for ingest reporting (use actual filename) 649 #this links a derived filename in processing dir with original filename 650 #get basic filename from the path+filename passed to this function to use as key 651 self.inputFileOrigFinal[new_filename_short]=filename 652 653 654 numfilesproc += 1 655 657 badXMLfiles += 1 658 self.badXMLfileList[new_filename_short]=filename 656 659 657 660 logging.info("File renaming and converting completed") … … 659 662 660 663 661 return numfilesproc 664 return numfilesproc,badXMLfiles 662 665 663 666 … … 724 727 725 728 726 numfilesproc = self._convertIngestFiles(self.originals_dir, self.discovery_dir, format)729 numfilesproc,badXmlFiles = self._convertIngestFiles(self.originals_dir, self.discovery_dir, format) 727 730 728 731 filenames = os.listdir(self.discovery_dir) … … 789 792 message = message + "Ingest date: " + str(datetime.datetime.now()) + "\n" 790 793 message = message + "Original metadata directory: " + self._harvest_home + "\n\n" 791 message = message + "TOTAL_PROCESSED " + str(numfilesproc) + "\n" 794 message = message + "TOTAL_NUMBER_OF_FILES " + str(numfilesproc+badXmlFiles) + "\n" 795 message = message + "TOTAL_PROCESSED_SUCCESFULLY " + str(numfilesproc) + "\n" 796 message = message + "TOTAL_PROCESSED_UNSUCCESFULLY " + str(badXmlFiles) + "\n" 792 797 message = message + "INGESTED_Created " + str(self._no_files_ingested) + "\n" 793 798 message = message + "INGESTED_Updated " + str(self._no_files_changed) + "\n" 794 message = message + "DELETED " + str(self._no_files_deleted) + "\n" 799 message = message + "DELETED " + str(self._no_files_deleted) + "\n" 795 800 message = message + "PROBLEM_FILES " + str(self._no_problem_files) + "\n" 796 797 for badFile in self.updateFailList: 798 #recOpFile.write("PROBLEM_FILE " + badFile + "\n") 799 message = message +"PROBLEM_FILE " + badFile + "\n" 800 801 message = message + "\nBelow are comments recorded on problem files...\n\n" 801 802 if len(self.updateFailList) > 0: 803 message = message + "\nBelow are comments recorded on problem files...\n\n" 804 805 for badFile in self.updateFailList: 806 #recOpFile.write("PROBLEM_FILE " + badFile + "\n") 807 message = message +"\nPROBLEM_FILE " + badFile + "\n" 808 809 if len(self.badXMLfileList.keys()) > 0: 810 message = message + "\nBelow are the files that coould not be parsed (i.e. bad XML?)...\n\n" 811 for badXmlFile in self.badXMLfileList.values(): 812 message = message + "BAD_XML_FILE " + badXmlFile +"\n" 813 814 802 815 803 816 #update with content from the problem messages recorded … … 806 819 recOpFile.write(message) 807 820 808 return numfilesproc, message821 return numfilesproc,badXmlFiles, message 809 822 810 823 -
TI01-discovery-Ingest/trunk/v4n_MEDIN/ingestAutomation-upgrade/OAIBatch/oai_document_ingester.py
r6875 r6891 60 60 self._base_dir = self.processingDict['base_directory'] 61 61 self._databaseConfigurationFile = self.processingDict['ingestConfig'] 62 redirectUrls = self.processingDict['changeURLs'] 62 63 self._ndgRedirectURL = self.processingDict['NDG_redirect_URL'] 63 64 self._saxonJarFile = self.processingDict['saxonJarFile'] … … 67 68 self._xqueryDocTypes = self.processingDict['xqDocTypes'] 68 69 self._currentMedinStandard = self.processingDict['currentMEDIN'] 70 71 #set boolean depending on whether we want to change urls for ndg redirection service 72 if redirectUrls == 'False': 73 logging.info("This ingest will NOT change url's to use the NDG redirection service!") 74 self.changeUrls = False 75 else: 76 logging.info("This ingest WILL change url's to use the NDG redirection service!") 77 self.changeUrls = True 78 69 79 70 80 self.processThread = 'OAI' … … 133 143 if self._datacentre_format in acceptedFormats: 134 144 135 numfilesproc, 145 numfilesproc,badXmlFiles,processingReport = self._convertAndIngestFiles(self.originals_dir, self.discovery_dir, dataCentre, True, self._datacentre_format) 136 146 137 147 else: … … 154 164 155 165 logging.info(self.lineSeparator) 156 message = 'Number of files processed = %s\n' %numfilesproc 166 message = 'Total Number of files processed = %s\n' %(numfilesproc + badXmlFiles) 167 logging.info(message) 168 outMessage += message 169 message = 'Total Number of files successfully processed = %s\n' %numfilesproc 170 logging.info(message) 171 outMessage += message 172 message = 'Total Number of files with XML errors = %s\n' %badXmlFiles 157 173 logging.info(message) 158 174 outMessage += message … … 165 181 message = "Number of problem files = %s\n" %self._no_problem_files 166 182 logging.info(message) 183 outMessage += message 167 184 logging.info(self.lineSeparator) 168 185 #Changed message to include more detail (SJD) but also now add any errors … … 172 189 173 190 174 191 #import pdb 192 #pdb.set_trace() 175 193 print "Script finished running." 176 194 return isSuccess, processingReport -
TI01-discovery-Ingest/trunk/v4n_MEDIN/ingestAutomation-upgrade/OAIBatch/run_all_ingest.py
r5243 r6891 4 4 import os, sys, logging,time,string 5 5 6 lineSeparator = "-----------------------------" 7 6 8 # configure logging 7 9 logging.basicConfig(level=logging.INFO, 8 10 format='%(asctime)s %(filename)s:%(lineno)d %(levelname)s %(message)s') 11 9 12 logging.info(lineSeparator) 10 13 logging.info("RUNNING: run_all_ingest.py") … … 13 16 from oai_document_ingester import oai_document_ingester 14 17 18 #pick up path info from processing config file 19 configFilePath = '/disks/glue1/sdonegan/NDG3_workspace/buildouts/oai_document_ingester_MEDIN/ingestAutomation-upgrade/OAIBatch/oai_document_ingester.config' 20 21 if not os.path.isfile(configFilePath): 22 sys.exit("ERROR: Could not find the processing config file") 23 24 processingConfig = {} 25 26 processing_config_file = open(configFilePath, "r") 27 28 for line in processing_config_file.readlines(): 29 words = string.split(line) 30 if len(words) == 0: 31 continue 32 elif words[0] == 'code_directory': 33 processingConfig['code_directory'] = words[1] 34 elif words[0] == 'base_directory': 35 processingConfig['base_directory'] = words[1] 36 elif words[0] == 'reporting_directory': 37 processingConfig['reporting_directory'] = words[1] 38 elif words[0] == 'passwords_file': 39 processingConfig['passwords_file'] = words[1] 40 elif words[0] == 'datcentre_configs': 41 processingConfig['datcentre_configs'] = words[1] 42 elif words[0] == 'ingest_name': 43 processingConfig['ingest_name'] = words[1] 15 44 16 45 run_counter = 0 17 46 error_counter = 0 18 47 19 lineSeparator = "-----------------------------" 20 21 current_dir = os.getcwd() + "/"# this is the base dir that the script is ran from48 #current_dir = os.getcwd() + "/"# this is the base dir that the script is ran from 49 #current_dir = '/home/badc/buildouts/oai_document_ingester/ingestAutomation-upgrade/OAIBatch/' # NOTE this is changed to the production buildout directory 50 current_dir = processingConfig['code_directory'] 22 51 logging.info("Running ingest script for all config files in the current run directory (%s)" %current_dir) 23 52 24 53 #create file for summary report on all ingests 25 summaryFileName = "data/runAllIngestSummary.txt" 54 #reportingDir = '/home/badc/discovery_docs/ingestDocs/data/' # base dir where production reporting and output should go 55 reportingDir = processingConfig['reporting_directory'] 56 summaryFileName = reportingDir + 'runAllIngestSummary.txt' 26 57 summaryFile = open(summaryFileName,'w') 27 58 … … 34 65 if filename.endswith(config_suffix): 35 66 logging.info("Found config file: %s" %filename) 36 67 37 68 # get the datacentre from the filename 38 69 datacentre = filename.replace(config_suffix, '') … … 47 78 try: 48 79 run_counter += 1 49 ingester.processDataCentre(datacentre) 80 success,report = ingester.processDataCentre(datacentre,None, None, configFilePath) 81 82 #add report to file 83 #summaryFile.write('***************** %s *********************\n' %datacentre) 84 summaryFile.write(report) 85 #summaryFile.write('\n******************************************************************\n\n') 86 50 87 except: 51 88 logging.error("Exception thrown - detail: ") … … 53 90 logging.info("Continue processing next datacentre config file...") 54 91 error_counter +=1 55 92 93 56 94 summaryFile.close() 57 95 58 96 if os.path.exists(summaryFileName): 59 commandline = "cat " + summaryFileName + " | mail -s 'ignis discovery ingest report' s.j.donegan@rl.ac.uk"97 commandline = "cat " + summaryFileName + " | mail -s %s steve.donegan@stfc.ac.uk" %processingConfig['ingest_name'] 60 98 os.system(commandline) 61 99 … … 63 101 logging.info("ingest report at: " + summaryFileName) 64 102 65 if error_counter > 0: 66 logging.error("WARNING: %s errors were encountered during the run - check logfiles for more details" %error_counter) 103 if error_counter > 0: 104 errorTxt = "WARNING: %s errors were encountered during the run - check logfiles for more details" %error_counter 105 logging.error(errorTxt) 106 commandline = "echo " + errorTxt + " | mail -s %s_PROBLEM steve.donegan@stfc.ac.uk" %processingConfig['ingest_name'] 67 107
Note: See TracChangeset
for help on using the changeset viewer.