diff --git a/batch/batch.js b/batch/batch.js index fbc7eb84..703e0ae3 100644 --- a/batch/batch.js +++ b/batch/batch.js @@ -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', diff --git a/batch/scheduler/host-scheduler.js b/batch/scheduler/host-scheduler.js index 43a088a9..0e143c82 100644 --- a/batch/scheduler/host-scheduler.js +++ b/batch/scheduler/host-scheduler.js @@ -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);