reportTaskProgress method
Task runners call ReportTaskProgress
when assigned a task to
acknowledge that it has the task. If the web service does not receive this
acknowledgement within 2 minutes, it assigns the task in a subsequent
PollForTask call. After this initial acknowledgement, the task
runner only needs to report progress every 15 minutes to maintain its
ownership of the task. You can change this reporting time from 15 minutes
by specifying a reportProgressTimeout
field in your pipeline.
If a task runner does not report its status after 5 minutes, AWS Data
Pipeline assumes that the task runner is unable to process the task and
reassigns the task in a subsequent response to PollForTask. Task
runners should call ReportTaskProgress
every 60 seconds.
May throw InternalServiceError. May throw InvalidRequestException. May throw TaskNotFoundException. May throw PipelineNotFoundException. May throw PipelineDeletedException.
Parameter taskId
:
The ID of the task assigned to the task runner. This value is provided in
the response for PollForTask.
Parameter fields
:
Key-value pairs that define the properties of the ReportTaskProgressInput
object.
Implementation
Future<ReportTaskProgressOutput> reportTaskProgress({
required String taskId,
List<Field>? fields,
}) async {
ArgumentError.checkNotNull(taskId, 'taskId');
_s.validateStringLength(
'taskId',
taskId,
1,
2048,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'DataPipeline.ReportTaskProgress'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'taskId': taskId,
if (fields != null) 'fields': fields,
},
);
return ReportTaskProgressOutput.fromJson(jsonResponse.body);
}