CartoDB-SQL-API/batch/job_publisher.js
2015-12-29 15:46:04 +01:00

15 lines
334 B
JavaScript

'use strict';
var redis = require('redis');
function JobPublisher() {
this.channel = 'batch:hosts';
this.client = redis.createClient(global.settings.redis_port, global.settings.redis_host);
}
JobPublisher.prototype.publish = function (host) {
this.client.publish(this.channel, host);
};
module.exports = JobPublisher;