add debugging

This commit is contained in:
Niko Storni 2019-07-08 21:03:12 +02:00
parent ba258cae03
commit 469ac7329a
3 changed files with 4 additions and 2 deletions

1
.gitignore vendored
View file

@ -9,3 +9,4 @@ npm-debug.log
claimTrieCache.json claimTrieCache.json
syncState.json syncState.json
yarn-error.log yarn-error.log
chainquery-config.json

View file

@ -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();

View file

@ -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);
} }