lib/task.js
function iterateDone() {
    dlog(start, 'iterate');
    blocksToRegister.map(function(block) {mm.register(block);});
    if (action) {
      if (action.opt._postIterate) {
        action.opt._postIterate(action.init, action.opt, self, tmpPart.partitionIndex, function () {
          done({data: {host: self.grid.host.uuid, path: self.exportFile}});
        });
      } else done({data: action.init});
    } else {
      const start1 = Date.now();
      self.nodes[self.datasetId].spillToDisk(self, function() {
        done({pid: self.pid, files: self.files});
        dlog(start1, 'spillToDisk');
      });
    }
  }
function iterateDone() {
    dlog(start, 'iterate');
    blocksToRegister.map(function(block) {mm.register(block);});
    if (action) {
      if (action.opt._postIterate) {
        action.opt._postIterate(action.init, action.opt, self, tmpPart.partitionIndex, function () {
          done({data: {host: self.grid.host.uuid, path: self.exportFile}});
        });
      } else done({data: action.init});
    } else {
      const start1 = Date.now();
      self.nodes[self.datasetId].spillToDisk(self, function() {
        done({pid: self.pid, files: self.files});
        dlog(start1, 'spillToDisk');
      });
    }
  }
function iterateDone ( ) { dlog ( start , 'iterate' ) ; blocksToRegister . map ( function ( block ) { mm . register ( block ) ; } ) ; if ( action ) { if ( action . opt . _postIterate ) { action . opt . _postIterate ( action . init , action . opt , self , tmpPart . partitionIndex , function ( ) { done ( { data : { host : self . grid . host . uuid , path : self . exportFile } } ) ; } ) ; } else done ( { data : action . init } ) ; } else { const start1 = Date . now ( ) ; self . nodes [ self . datasetId ] . spillToDisk ( self , function ( ) { done ( { pid : self . pid , files : self . files } ) ; dlog ( start1 , 'spillToDisk' ) ; } ) ; } }
Post-iterate actions
Post - iterate actions