Implement a non-polling flag in the DB-Extractor

This commit is contained in:
Joe Tretter
2019-04-09 14:20:21 -05:00
parent 84c045f6c8
commit d06d0a32bf
2 changed files with 9 additions and 3 deletions

View File

@@ -5,9 +5,10 @@
"serverURI": "http://localhost:2222",
"maxResultsPerMessage":100,
"statements":{
"poller":"'select top ' + config.maxResultsPerMessage + ' * from rpslog with (nolock) where pkey > \\'' + maxPKey + '\\' and businessModified < dateAdd(mi,-30, getdate()) order by pkey'"
"poller":"'select top ' + config.maxResultsPerMessage + ' * from rpslog with (nolock) where pkey > \\'' + maxPKey + '\\' order by pkey'"
},
"pollIntervalIdle": 10000,
"pollMode": false,
"UP_sqlConfig": {
"user": "casdbuser",
"password": "4KcLao2016!",

View File

@@ -99,8 +99,13 @@ try {
});
process.stdout.write(">" + allRows.length + ">");
} else {
theInterval = setInterval(runNextPoll, config.pollIntervalIdle);
process.stdout.write(".");
if (config.pollMode) {
theInterval = setInterval(runNextPoll, config.pollIntervalIdle);
process.stdout.write(".");
} else {
sql.close();
return(true);
}
}
allRows=[];