Skip to content

Commit 18fc0fc

Browse files
committed
Merge pull request #46 from AnyFetch/fix-post-prod
stop logging all documents and stop initializing opbeat
2 parents 5fe1d16 + c40fd8b commit 18fc0fc

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/handlers/hydrater.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ module.exports = function(req, res, server, next) {
4747
log.warn(err, "Error while queuing " + (task.file_path) ? task.file_path : task.document.id);
4848
}
4949
else {
50-
log.info(task, "Queuing task");
50+
var loggingTask = {file_path: task.file_path, callback: task.callback, document: {id: task.document.id, identifier: task.document.identifier}};
51+
log.info(loggingTask, "Queuing task");
5152
}
5253
});
5354

lib/helpers/child-process.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ var logError = require('../utils').logError;
2020
var filePath;
2121
var path;
2222

23+
var opbeatInitialized = false;
2324

2425
process.on('message', function(task) {
2526
filePath = task.file_path;
@@ -29,9 +30,10 @@ process.on('message', function(task) {
2930
logError.config = task.opbeatConfig;
3031

3132
/* istanbul ignore next */
32-
if(task.opbeatConfig && task.opbeatConfig.secretToken) {
33+
if(!opbeatInitialized && task.opbeatConfig && task.opbeatConfig.secretToken) {
3334
var opbeat = require('opbeat');
3435
logError.opbeat = opbeat(task.opbeatConfig);
36+
opbeatInitialized = true;
3537
}
3638

3739
async.waterfall([

0 commit comments

Comments
 (0)