lib/daemon/ejector.js
function Ejector(conf) {
  component.Component.call(this, 'ejector', conf);
  var that = this;
  this._dbconn = conf.dbconn;
  this.registerGearman(conf.servers, {
    worker: {
      func_name: 'delayedJobDone',
      func: function(payload, worker) {
        var task = JSON.parse(payload.toString());
        that._info('Received a task with id:', task.id);
        that.eject(task, worker);
      }
    }
  });
}
function Ejector(conf) {
  component.Component.call(this, 'ejector', conf);
  var that = this;
  this._dbconn = conf.dbconn;
  this.registerGearman(conf.servers, {
    worker: {
      func_name: 'delayedJobDone',
      func: function(payload, worker) {
        var task = JSON.parse(payload.toString());
        that._info('Received a task with id:', task.id);
        that.eject(task, worker);
      }
    }
  });
}
function Ejector ( conf ) { component . Component . call ( this , 'ejector' , conf ) ; var that = this ; this . _dbconn = conf . dbconn ; this . registerGearman ( conf . servers , { worker : { func_name : 'delayedJobDone' , func : function ( payload , worker ) { var task = JSON . parse ( payload . toString ( ) ) ; that . _info ( 'Received a task with id:' , task . id ) ; that . eject ( task , worker ) ; } } } ) ; }
Ejector component. Emits 'connect' when at least one server is connected.
Ejector component . Emits connect when at least one server is connected .