/// <summary> /// Pre-process is responsible for doing anything that needs to happen for a job before it is /// put on the stack for work /// </summary> /// <param name="configs"></param> private void preProcess(IList <ExtractorConfiguration> configs) { return; // actually... don't care what type of SQL DAO - just return from all of them // for each extractor configuration, perform the on_start sql foreach (ExtractorConfiguration config in configs) { ISqlDao sqlDao = _sqlDao; try { if (config.ON_START == null || config.ON_START.Equals(String.Empty)) { } else { try { sqlDao.executeDelimited(config.ON_START, 0); } catch (Exception exc) { _report.addError("An error occurred during the execution of on_start:" + config.QueryConfigurations.RootNode.Value.File, exc); } } // for each query configuration, disable indexes on the file IList <string> distinctFiles = new List <string>(); parseDistinctFiles(config.QueryConfigurations.RootNode, distinctFiles); foreach (string file in distinctFiles) { try { sqlDao.disableIndexes(file); } catch (Exception exc) { _report.addError("An error occurred during the de-indexing of file:" + file, exc); } } _sqlDao.executeStoredProcedureNoArguments(config.QueryConfigurations.RootNode.Value.File + "_BEGIN", 0); } catch (Exception exc) { if (exc.Message.Contains("identifier '" + config.QueryConfigurations.RootNode.Value.File + "_BEGIN' must be declared")) { // Ignore exceptions related to the procedure not being defined // TODO: not sql server safe } else { Report.addError(exc.Message, exc); ((OrchestratorReport)Report).HasError = "T"; } } } }