Improved naming for jobs TTL constant
This commit is contained in:
parent
01d1866e11
commit
2932227e8b
@ -5,7 +5,7 @@ var queue = require('queue-async');
|
||||
var debug = require('./util/debug')('job-backend');
|
||||
var REDIS_PREFIX = 'batch:jobs:';
|
||||
var REDIS_DB = 5;
|
||||
var JOBS_TTL_IN_SECONDS = global.settings.jobs_ttl_in_seconds || 48 * 3600; // 48 hours
|
||||
var FINISHED_JOBS_TTL_IN_SECONDS = global.settings.finished_jobs_ttl_in_seconds || 48 * 3600; // 48 hours
|
||||
var jobStatus = require('./job_status');
|
||||
var finalStatus = [
|
||||
jobStatus.CANCELLED,
|
||||
@ -178,7 +178,7 @@ JobBackend.prototype.setTTL = function (job, callback) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
self.metadataBackend.redisCmd(REDIS_DB, 'EXPIRE', [ redisKey, JOBS_TTL_IN_SECONDS ], callback);
|
||||
self.metadataBackend.redisCmd(REDIS_DB, 'EXPIRE', [ redisKey, FINISHED_JOBS_TTL_IN_SECONDS ], callback);
|
||||
};
|
||||
|
||||
JobBackend.prototype.list = function (user, callback) {
|
||||
|
@ -29,7 +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
|
||||
module.exports.finished_jobs_ttl_in_seconds = 2 * 3600; // 2 hours
|
||||
// Max database connections in the pool
|
||||
// Subsequent connections will wait for a free slot.
|
||||
// NOTE: not used by OGR-mediated accesses
|
||||
|
@ -30,7 +30,7 @@ module.exports.db_pubuser_pass = 'public';
|
||||
module.exports.db_host = 'localhost';
|
||||
module.exports.db_port = '6432';
|
||||
module.exports.db_batch_port = '5432';
|
||||
module.exports.jobs_ttl_in_seconds = 48 * 3600; // 48 hours
|
||||
module.exports.finished_jobs_ttl_in_seconds = 2 * 3600; // 2 hours
|
||||
// Max database connections in the pool
|
||||
// Subsequent connections will wait for a free slot.i
|
||||
// NOTE: not used by OGR-mediated accesses
|
||||
|
@ -30,7 +30,7 @@ module.exports.db_pubuser_pass = 'public';
|
||||
module.exports.db_host = 'localhost';
|
||||
module.exports.db_port = '6432';
|
||||
module.exports.db_batch_port = '5432';
|
||||
module.exports.jobs_ttl_in_seconds = 48 * 3600; // 48 hours
|
||||
module.exports.finished_jobs_ttl_in_seconds = 2 * 3600; // 2 hours
|
||||
// Max database connections in the pool
|
||||
// Subsequent connections will wait for a free slot.
|
||||
// NOTE: not used by OGR-mediated accesses
|
||||
|
@ -27,7 +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
|
||||
module.exports.finished_jobs_ttl_in_seconds = 2 * 3600; // 2 hours
|
||||
// Max database connections in the pool
|
||||
// Subsequent connections will wait for a free slot.
|
||||
// NOTE: not used by OGR-mediated accesses
|
||||
|
Loading…
Reference in New Issue
Block a user