more flexibility for queries (strore in config file)
This commit is contained in:
@@ -39,7 +39,6 @@ logger.log("info", `DBExtractor v0.1 Starting`);
|
||||
|
||||
|
||||
logger.log("debug", "Config" + JSON.stringify(config))
|
||||
const maxResultsPerMessage=100;
|
||||
let maxPKey = "";
|
||||
let maxPKeyUnsent = "";
|
||||
let allRows = [];
|
||||
@@ -52,7 +51,7 @@ try {
|
||||
logger.log("debug", "MaxPKey Loaded: " + maxPKey);
|
||||
} catch (ex) {
|
||||
if (ex.errno === -4058) {
|
||||
logger.log("info", "MaxPKey-File not existing. Will be created.");
|
||||
logger.log("info", "MaxPKey-File not existing. All data will be processed");
|
||||
} else {
|
||||
logger.log("error", "opening DBExtractor.maxPKey.dat :" + ex);
|
||||
}
|
||||
@@ -67,7 +66,7 @@ try {
|
||||
sqlRequest.stream = true;
|
||||
|
||||
function runNextPoll(){
|
||||
sqlRequest.query("select top " + maxResultsPerMessage + " * from rpslog where pkey > '" + maxPKey + "' order by pkey");
|
||||
sqlRequest.query(eval(config.statements.poller));
|
||||
}
|
||||
|
||||
runNextPoll();
|
||||
|
||||
Reference in New Issue
Block a user