From 84c045f6c8e04358bf07fac1eeade4a66489bf5a Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 25 Feb 2019 06:42:15 -0600 Subject: [PATCH] misc smaller changes and change example config to include time based SQL condition to prevent loss of in-flight data. --- DBExtractor/DBExtractor.config.json.example | 2 +- DBExtractor/DBExtractor.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DBExtractor/DBExtractor.config.json.example b/DBExtractor/DBExtractor.config.json.example index de91abf..e296cc6 100644 --- a/DBExtractor/DBExtractor.config.json.example +++ b/DBExtractor/DBExtractor.config.json.example @@ -5,7 +5,7 @@ "serverURI": "http://localhost:2222", "maxResultsPerMessage":100, "statements":{ - "poller":"'select top ' + config.maxResultsPerMessage + ' * from rpslog where pkey > \\'' + maxPKey + '\\' order by pkey'" + "poller":"'select top ' + config.maxResultsPerMessage + ' * from rpslog with (nolock) where pkey > \\'' + maxPKey + '\\' and businessModified < dateAdd(mi,-30, getdate()) order by pkey'" }, "pollIntervalIdle": 10000, "UP_sqlConfig": { diff --git a/DBExtractor/DBExtractor.js b/DBExtractor/DBExtractor.js index 5e9cdf8..9e2dfe1 100644 --- a/DBExtractor/DBExtractor.js +++ b/DBExtractor/DBExtractor.js @@ -15,8 +15,8 @@ const logger = winston.createLogger({ ), transports: [ new winston.transports.Console(), - new winston.transports.File({ filename: './log/DBExtractorError.log', level: 'error' }), - new winston.transports.File({ filename: './log/Combined.log' }) + new winston.transports.File({ filename: '../log/DBExtractorError.log', level: 'error' }), + new winston.transports.File({ filename: '../log/Combined.log' }) ] });