lib/bus.js
function(err, resp) {
          if (err) {
            _this.emit('error', 'failed to upload script ' + script.name + ' to redis: ' + err);
            return;
          }
          else {
            // cluster will send back the hash as many times as there are nodes
            script.hash = Array.isArray(resp) ? resp[0] : resp;
          }
          if (--dones === 0) {
            _this.online = true;
            _this.logger.isDebug() && _this.logger.debug("bus is online");
            _this.emit('online');
          }
        }
function(err, resp) {
          if (err) {
            _this.emit('error', 'failed to upload script ' + script.name + ' to redis: ' + err);
            return;
          }
          else {
            // cluster will send back the hash as many times as there are nodes
            script.hash = Array.isArray(resp) ? resp[0] : resp;
          }
          if (--dones === 0) {
            _this.online = true;
            _this.logger.isDebug() && _this.logger.debug("bus is online");
            _this.emit('online');
          }
        }
function ( err , resp ) { if ( err ) { _this . emit ( 'error' , 'failed to upload script ' + script . name + ' to redis: ' + err ) ; return ; } else { // cluster will send back the hash as many times as there are nodes script . hash = Array . isArray ( resp ) ? resp [ 0 ] : resp ; } if ( -- dones === 0 ) { _this . online = true ; _this . logger . isDebug ( ) && _this . logger . debug ( "bus is online" ) ; _this . emit ( 'online' ) ; } }
send the script to redis
send the script to redis