Skip to content

Commit 7360697

Browse files
committed
chore: logs to check description and usage data
1 parent b3b58a5 commit 7360697

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

api/controllers/WorkerController.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,17 @@ module.exports = {
2222
result.then(function(value) {
2323
var key = 'view_topic_' + value.id;
2424
RedisService.invalidateTopicById(key);
25-
console.log(value);
25+
// console.log(value);
2626
res.json(value);
2727
})
2828
.catch(Sequelize.UniqueConstraintError, function (err) {
29+
console.log('Sequelize.UniqueConstraintError: ', err.errors);
2930
return res.send(409, err.errors);
3031
}).catch(Sequelize.ValidationError, function (err) {
32+
console.log('Sequelize.ValidationError: ', err.errors);
3133
return res.send(400, err.errors);
3234
}).catch(function(err){
35+
console.log(err.errors);
3336
return res.negotiate(err.errors);
3437
});
3538

api/models/Topic.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,13 @@ module.exports = {
229229

230230
var topic = _.pick(rdJSON, attributes);
231231

232+
console.log('topic.usage before processing: ', topic.usage);
232233
if (topic.usage !== null && typeof topic.usage === 'object') {
233234
topic.usage = topic.usage.contents;
234235
}
235236

237+
console.log('topic.usage after processing: ', topic.usage);
238+
236239
if (topic.description !== null && typeof topic.description === 'object') {
237240
topic.description = topic.description.contents;
238241
}

config/routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ module.exports.routes = {
184184

185185
// Parsing
186186
'get /api/parsing/jobs': 'PackageController.toParse',
187-
187+
'post /api/process_message': 'WorkerController.processMessage',
188188
'get /api/users/*': 'UserController.show',
189189

190190
};

0 commit comments

Comments
 (0)