Change signature

This commit is contained in:
Daniel García Aubert 2016-10-27 17:46:43 +02:00
parent ed5b2fb132
commit c1f2f9377d
2 changed files with 5 additions and 5 deletions

View File

@ -170,13 +170,13 @@ var WORK_IN_PROGRESS_JOB = {
PREFIX: 'batch:wip:' PREFIX: 'batch:wip:'
}; };
JobBackend.prototype.addWorkInProgressJob = function (job_id, user, callback) { JobBackend.prototype.addWorkInProgressJob = function (user, jobId, callback) {
var hostWIPKey = WORK_IN_PROGRESS_JOB.PREFIX + this.hostname; // Will be used for draining jobs. var hostWIPKey = WORK_IN_PROGRESS_JOB.PREFIX + this.hostname; // Will be used for draining jobs.
var userWIPKey = WORK_IN_PROGRESS_JOB.PREFIX + user; // Will be used for listing users and running jobs var userWIPKey = WORK_IN_PROGRESS_JOB.PREFIX + user; // Will be used for listing users and running jobs
this.metadataBackend.redisMultiCmd(WORK_IN_PROGRESS_JOB.DB, [ this.metadataBackend.redisMultiCmd(WORK_IN_PROGRESS_JOB.DB, [
['RPUSH', hostWIPKey, job_id], ['RPUSH', hostWIPKey, jobId],
['RPUSH', userWIPKey, job_id] ['RPUSH', userWIPKey, jobId]
], callback); ], callback);
}; };

View File

@ -123,6 +123,6 @@ JobService.prototype.drain = function (job_id, callback) {
}); });
}; };
JobService.prototype.addWorkInProgressJob = function (job, callback) { JobService.prototype.addWorkInProgressJob = function (user, jobId, callback) {
this.jobBackend.addWorkInProgressJob(job.job_id, job.user, callback); this.jobBackend.addWorkInProgressJob(user, jobId, callback);
}; };