360
return nil, err
361
}
363
return nil, nil
364
}
365
367
>
var eventsBatches []*commonpb.DataBlob
368
>
if config.ReplicationMultipleBatches() {
369
eventsBatches = currentEvents
371
>
if len(currentEvents) != 1 {
372
return nil, serviceerror.NewInternal("replicatorQueueProcessor encountered more than 1 NDC raw event batch")
373
}
375
}
376
378
>
TaskType: enumsspb.REPLICATION_TASK_TYPE_HISTORY_V2_TASK,
379
>
SourceTaskId: taskInfo.TaskID,
380
>
Attributes: &replicationspb.ReplicationTask_HistoryTaskAttributes{
381
>
HistoryTaskAttributes: &replicationspb.HistoryTaskAttributes{
382
>
NamespaceId: taskInfo.NamespaceID,
383
>
WorkflowId: taskInfo.WorkflowID,
384
>
RunId: taskInfo.RunID,
385
>
BaseExecutionInfo: currentBaseWorkflowInfo,
386
>
VersionHistoryItems: currentVersionHistory,
387
>
Events: events,
388
>
EventsBatches: eventsBatches,
389
>
NewRunEvents: newEvents,
390
>
NewRunId: taskInfo.NewRunID,
391
>
},
392
>
},
393
>
VisibilityTime: timestamppb.New(taskInfo.VisibilityTimestamp),
394
>
}, nil
395
}
396