diff --git a/app/server.js b/app/server.js index 1513f7ed..1deeba76 100644 --- a/app/server.js +++ b/app/server.js @@ -209,7 +209,7 @@ function App() { var isBatchProcess = process.argv.indexOf('--no-batch') === -1; if (global.settings.environment !== 'test' && isBatchProcess) { - app.batch = batchFactory(metadataBackend, redisConfig, statsd_client); + app.batch = batchFactory(metadataBackend, redisConfig, statsd_client, global.settings.batch_log_filename); app.batch.start(); } diff --git a/config/environments/development.js.example b/config/environments/development.js.example index 6eae0145..3303c71e 100644 --- a/config/environments/development.js.example +++ b/config/environments/development.js.example @@ -30,6 +30,7 @@ module.exports.db_host = 'localhost'; module.exports.db_port = '5432'; module.exports.db_batch_port = '5432'; module.exports.finished_jobs_ttl_in_seconds = 2 * 3600; // 2 hours +module.exports.batch_log_filename = 'logs/batch-queries.log'; // Max database connections in the pool // Subsequent connections will wait for a free slot. // NOTE: not used by OGR-mediated accesses diff --git a/config/environments/production.js.example b/config/environments/production.js.example index 96683a51..6e5ba080 100644 --- a/config/environments/production.js.example +++ b/config/environments/production.js.example @@ -31,6 +31,7 @@ module.exports.db_host = 'localhost'; module.exports.db_port = '6432'; module.exports.db_batch_port = '5432'; module.exports.finished_jobs_ttl_in_seconds = 2 * 3600; // 2 hours +module.exports.batch_log_filename = 'logs/batch-queries.log'; // Max database connections in the pool // Subsequent connections will wait for a free slot.i // NOTE: not used by OGR-mediated accesses diff --git a/config/environments/staging.js.example b/config/environments/staging.js.example index 123e56fd..ce31b032 100644 --- a/config/environments/staging.js.example +++ b/config/environments/staging.js.example @@ -31,6 +31,7 @@ module.exports.db_host = 'localhost'; module.exports.db_port = '6432'; module.exports.db_batch_port = '5432'; module.exports.finished_jobs_ttl_in_seconds = 2 * 3600; // 2 hours +module.exports.batch_log_filename = 'logs/batch-queries.log'; // Max database connections in the pool // Subsequent connections will wait for a free slot. // NOTE: not used by OGR-mediated accesses diff --git a/config/environments/test.js.example b/config/environments/test.js.example index d0ef2236..01df1ebc 100644 --- a/config/environments/test.js.example +++ b/config/environments/test.js.example @@ -28,6 +28,7 @@ module.exports.db_host = 'localhost'; module.exports.db_port = '5432'; module.exports.db_batch_port = '5432'; module.exports.finished_jobs_ttl_in_seconds = 2 * 3600; // 2 hours +module.exports.batch_log_filename = 'logs/batch-queries.log'; // Max database connections in the pool // Subsequent connections will wait for a free slot. // NOTE: not used by OGR-mediated accesses