Improved naming for jobs TTL constant
This commit is contained in:
parent
01d1866e11
commit
02a252940a
@ -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.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) {
|
||||
|
Loading…
Reference in New Issue
Block a user