stream-consumer.js
function createProcessBatchTask(batch, context) {
    // Define a new process task definition for the batch & updates the batch with it
    batch.taskDefs.processTaskDef = defineProcessBatchTask();

    const task = context.taskFactory.createTask(batch.taskDefs.processTaskDef, processTaskOpts);

    // Cache it on the batch
    const processingTasks = batch.getOrSetProcessingTasks();
    processingTasks[task.name] = task;

    return task;
  }
function createProcessBatchTask(batch, context) {
    // Define a new process task definition for the batch & updates the batch with it
    batch.taskDefs.processTaskDef = defineProcessBatchTask();

    const task = context.taskFactory.createTask(batch.taskDefs.processTaskDef, processTaskOpts);

    // Cache it on the batch
    const processingTasks = batch.getOrSetProcessingTasks();
    processingTasks[task.name] = task;

    return task;
  }
function createProcessBatchTask ( batch , context ) { // Define a new process task definition for the batch & updates the batch with it batch . taskDefs . processTaskDef = defineProcessBatchTask ( ) ; const task = context . taskFactory . createTask ( batch . taskDefs . processTaskDef , processTaskOpts ) ; // Cache it on the batch const processingTasks = batch . getOrSetProcessingTasks ( ) ; processingTasks [ task . name ] = task ; return task ; }
Creates a new process batch task to be used to process the batch and to strack the state of the processing phase.
@param {Batch} batch - the batch to be processed
@param {StreamConsumerContext} context - the context to use
@returns {ProcessBatchTask} a new process batch task (with sub-tasks)
Creates a new process batch task to be used to process the batch and to strack the state of the processing phase .