index.js
function iface(end) {
    if (end) {
      return db.quit(next);
    } else {
      // Get all the domains whose records expired some time before now
      db.eval(scoreRange,2,'expiring_domains','querying_domains',
        '-inf', Date.now(), function (err, res) {
          if (err) return cb(err);
          // Query each of these domains
          for (var i = 0; i < res.length; i += 2) {
            queryDomain(res[i], finishQuerying.bind(null, res[i]));
          }
        });
      return iface;
    }
  }
function iface(end) {
    if (end) {
      return db.quit(next);
    } else {
      // Get all the domains whose records expired some time before now
      db.eval(scoreRange,2,'expiring_domains','querying_domains',
        '-inf', Date.now(), function (err, res) {
          if (err) return cb(err);
          // Query each of these domains
          for (var i = 0; i < res.length; i += 2) {
            queryDomain(res[i], finishQuerying.bind(null, res[i]));
          }
        });
      return iface;
    }
  }
function iface ( end ) { if ( end ) { return db . quit ( next ) ; } else { // Get all the domains whose records expired some time before now db . eval ( scoreRange , 2 , 'expiring_domains' , 'querying_domains' , '-inf' , Date . now ( ) , function ( err , res ) { if ( err ) return cb ( err ) ; // Query each of these domains for ( var i = 0 ; i < res . length ; i += 2 ) { queryDomain ( res [ i ] , finishQuerying . bind ( null , res [ i ] ) ) ; } } ) ; return iface ; } }
The interface interval function we return
The interface interval function we return