Changed job's ttl to be configurable

This commit is contained in:
Daniel García Aubert 2016-01-21 15:33:42 +01:00
parent ad8b610321
commit 31ac48ef1a
5 changed files with 7 additions and 3 deletions

View File

@ -2,7 +2,7 @@
var uuid = require('node-uuid'); var uuid = require('node-uuid');
var queue = require('queue-async'); 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) { function JobBackend(metadataBackend, jobQueueProducer, jobPublisher, userIndexer) {
this.db = 5; this.db = 5;

View File

@ -29,6 +29,7 @@ module.exports.db_pubuser_pass = 'public';
module.exports.db_host = 'localhost'; module.exports.db_host = 'localhost';
module.exports.db_port = '5432'; module.exports.db_port = '5432';
module.exports.db_batch_port = '5432'; module.exports.db_batch_port = '5432';
module.exports.jobs_ttl_in_seconds = 48 * 3600; // 48 hours
// Max database connections in the pool // Max database connections in the pool
// Subsequent connections will wait for a free slot. // Subsequent connections will wait for a free slot.
// NOTE: not used by OGR-mediated accesses // NOTE: not used by OGR-mediated accesses

View File

@ -29,7 +29,8 @@ module.exports.db_pubuser = 'publicuser';
module.exports.db_pubuser_pass = 'public'; module.exports.db_pubuser_pass = 'public';
module.exports.db_host = 'localhost'; module.exports.db_host = 'localhost';
module.exports.db_port = '6432'; 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 // Max database connections in the pool
// Subsequent connections will wait for a free slot.i // Subsequent connections will wait for a free slot.i
// NOTE: not used by OGR-mediated accesses // NOTE: not used by OGR-mediated accesses

View File

@ -29,7 +29,8 @@ module.exports.db_pubuser = 'publicuser';
module.exports.db_pubuser_pass = 'public'; module.exports.db_pubuser_pass = 'public';
module.exports.db_host = 'localhost'; module.exports.db_host = 'localhost';
module.exports.db_port = '6432'; 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 // Max database connections in the pool
// Subsequent connections will wait for a free slot. // Subsequent connections will wait for a free slot.
// NOTE: not used by OGR-mediated accesses // NOTE: not used by OGR-mediated accesses

View File

@ -27,6 +27,7 @@ module.exports.db_pubuser_pass = 'public';
module.exports.db_host = 'localhost'; module.exports.db_host = 'localhost';
module.exports.db_port = '5432'; module.exports.db_port = '5432';
module.exports.db_batch_port = '5432'; module.exports.db_batch_port = '5432';
module.exports.jobs_ttl_in_seconds = 48 * 3600; // 48 hours
// Max database connections in the pool // Max database connections in the pool
// Subsequent connections will wait for a free slot. // Subsequent connections will wait for a free slot.
// NOTE: not used by OGR-mediated accesses // NOTE: not used by OGR-mediated accesses