210
return response.GetHistoryBatches(), response.GetVersionHistory(), response.NextPageToken, nil
211
}
213
>
NamespaceId: namespaceID.String(),
214
>
Execution: &commonpb.WorkflowExecution{
215
>
WorkflowId: workflowID,
216
>
RunId: runID,
217
>
},
218
>
StartEventId: startEventID,
219
>
StartEventVersion: startEventVersion,
220
>
EndEventId: endEventID,
221
>
EndEventVersion: endEventVersion,
222
>
MaximumPageSize: pageSize,
223
>
NextPageToken: token,
224
>
})
225
>
if err != nil {
226
return nil, nil, nil, err
227
}
229
}
230
232
>
if err != nil {
233
logger.Error("error getting history", tag.Error(err))
234
return nil, nil, err
235
}
236
238
>
for _, history := range dataBlobs {
239
>
batch := &HistoryBatch{
240
>
VersionHistory: versionHistory,
241
>
RawEventBatch: history,
242
>
}
243
>
batches = append(batches, batch)
244
>
}
245
>
return batches, nextPageToken, nil
246
}