use DB connector instead of web API #158
3 changed files with 4 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -9,3 +9,4 @@ npm-debug.log
|
||||||
claimTrieCache.json
|
claimTrieCache.json
|
||||||
syncState.json
|
syncState.json
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
|
chainquery-config.json
|
||||||
|
|
|
@ -12,8 +12,8 @@ require('winston-daily-rotate-file');
|
||||||
// Setup logging
|
// Setup logging
|
||||||
winston.remove(winston.transports.Console);
|
winston.remove(winston.transports.Console);
|
||||||
winston.add(winston.transports.Console, { colorize: true, timestamp: true, prettyPrint: true });
|
winston.add(winston.transports.Console, { colorize: true, timestamp: true, prettyPrint: true });
|
||||||
var slackAPIKey = process.env.SLACK_HOOK_URL;
|
let slackAPIKey = process.env.SLACK_HOOK_URL;
|
||||||
var mySlack = new slack(slackAPIKey, {});
|
let mySlack = new slack(slackAPIKey, {});
|
||||||
// Create Koa Application
|
// Create Koa Application
|
||||||
const app = new Koa();
|
const app = new Koa();
|
||||||
|
|
||||||
|
|
|
@ -207,6 +207,7 @@ function getClaimsSince (time, lastID, MaxClaimsInCall) {
|
||||||
console.log(query);
|
console.log(query);
|
||||||
connection.query(query, function (err, results, fields) {
|
connection.query(query, function (err, results, fields) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
console.error(err);
|
||||||
logErrorToSlack('[Importer] Error getting updated claims. ' + err);
|
logErrorToSlack('[Importer] Error getting updated claims. ' + err);
|
||||||
return reject(err);
|
return reject(err);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue