diff --git a/batch/job_backend.js b/batch/job_backend.js index 8b27be78..c661cedf 100644 --- a/batch/job_backend.js +++ b/batch/job_backend.js @@ -2,7 +2,7 @@ var uuid = require('node-uuid'); var queue = require('queue-async'); -var JOBS_TTL_IN_SECONDS = 48 * 3600; +var JOBS_TTL_IN_SECONDS = global.settings.jobs_ttl_in_seconds || 48 * 3600; // 48 hours function JobBackend(metadataBackend, jobQueueProducer, jobPublisher, userIndexer) { this.db = 5; diff --git a/config/environments/development.js.example b/config/environments/development.js.example index 06c96480..3f46b9ec 100644 --- a/config/environments/development.js.example +++ b/config/environments/development.js.example @@ -29,6 +29,7 @@ module.exports.db_pubuser_pass = 'public'; module.exports.db_host = 'localhost'; module.exports.db_port = '5432'; module.exports.db_batch_port = '5432'; +module.exports.jobs_ttl_in_seconds = 48 * 3600; // 48 hours // 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 f7d3868d..09e1abe3 100644 --- a/config/environments/production.js.example +++ b/config/environments/production.js.example @@ -29,7 +29,8 @@ module.exports.db_pubuser = 'publicuser'; module.exports.db_pubuser_pass = 'public'; module.exports.db_host = 'localhost'; module.exports.db_port = '6432'; -module.exports.db_batch_port = '6432'; +module.exports.db_batch_port = '5432'; +module.exports.jobs_ttl_in_seconds = 48 * 3600; // 48 hours // 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 f90ba14b..51eecc7d 100644 --- a/config/environments/staging.js.example +++ b/config/environments/staging.js.example @@ -29,7 +29,8 @@ module.exports.db_pubuser = 'publicuser'; module.exports.db_pubuser_pass = 'public'; module.exports.db_host = 'localhost'; module.exports.db_port = '6432'; -module.exports.db_batch_port = '6432'; +module.exports.db_batch_port = '5432'; +module.exports.jobs_ttl_in_seconds = 48 * 3600; // 48 hours // 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 1cea7ae2..314983a5 100644 --- a/config/environments/test.js.example +++ b/config/environments/test.js.example @@ -27,6 +27,7 @@ module.exports.db_pubuser_pass = 'public'; module.exports.db_host = 'localhost'; module.exports.db_port = '5432'; module.exports.db_batch_port = '5432'; +module.exports.jobs_ttl_in_seconds = 48 * 3600; // 48 hours // Max database connections in the pool // Subsequent connections will wait for a free slot. // NOTE: not used by OGR-mediated accesses