This commit is contained in:
Raul Ochoa 2016-10-19 10:36:13 +02:00
parent 3a57331a54
commit ac65c1c39a
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ Batch.prototype.subscribe = function () {
this.jobSubscriber.subscribe(
function onJobHandler(user, host) {
debug('onJobHandler(%s, %s)', user, host);
self.hostScheduler.schedule(host, user, function(err) {
self.hostScheduler.add(host, user, function(err) {
if (err) {
return debug(
'Could not schedule host=%s user=%s from %s. Reason: %s',

View File

@ -19,7 +19,7 @@ function HostScheduler(taskRunner, redisPool) {
module.exports = HostScheduler;
HostScheduler.prototype.schedule = function(host, user, callback) {
HostScheduler.prototype.add = function(host, user, callback) {
this.lock(host, function(err, scheduler) {
if (err) {
return callback(err);