if not appContext.getResultCollector() is None: if appContext.getResultCollector().getRecordsDeleted() > 0: procMess = ["start time: ", str( startTime) , "end time: " + str(datetime.now()), "outputfile: " + appContext.getConfiguration().getSummaryContentFile(), "records deleted and shipped to CBS: " + str(appContext.getResultCollector().getRecordsDeleted()), "\n"] writeContext.writeLog(header="records deleted we haven't got via the standard OAI channel",message=procMess ) else: procMess = ["\n", "start time: ", str( startTime) , "end time: " + str(datetime.now()), "\n"] writeContext.writeLog(header="We haven't got a compilation of deleted records that should be shipped to CBS",message=procMess ) else: writeContext.writeErrorLog(message= "ResultCollector was None - Why?") writeContext.writeLog(message= "ResultCollector was None - Why?") if not mongoWrapper is None: mongoWrapper.closeResources() os.chdir(appContext.getConfiguration().getApplicationDir())
str(appContext.getResultCollector().getRecordsToCBSUpdated()), "records to cbs (without skip mechanism - configuration!): " + str(appContext.getResultCollector().getRecordsToCBSNoSkip()), "\n" ] if not appContext.getConfiguration() is None: procMess = SwissbibUtilities.addBlockedMessageToLogSummary( procMess, appContext.getConfiguration()) writeContext.writeLog(header="oai harvesting summary", message=procMess) else: procMess = ["ResultCollector was None - Why?"] if not appContext.getConfiguration() is None: procMess = SwissbibUtilities.addBlockedMessageToLogSummary( procMess, appContext.getConfiguration()) writeContext.writeErrorLog(message="\n".join(procMess)) writeContext.writeLog(message="\n".join(procMess)) #At the moment I don't want to use the advanced Harvesting Functionality like # - analyze Hash so records with no interest for the import process will be skipped # -> then I can deactivate the Mongo charged with storing this content. To deactivate the instance the storing of Summary results has to be skipped too because it uses the same process #mongoWrapper.storeResultOfProcessing(rCollector,sConfigs) if not mongoWrapper is None: mongoWrapper.closeResources() os.chdir(appContext.getConfiguration().getApplicationDir())