AWS SDK for .NET Documentation
PollForTask Method (pollForTaskRequest)
Amazon ► Amazon.DataPipeline ► AmazonDataPipeline ► PollForTask(PollForTaskRequest)
Did this page help you? Yes No Tell us about it...

Task runners call this action to receive a task to perform from AWS Data Pipeline. The task runner specifies which tasks it can perform by setting a value for the workerGroup parameter of the PollForTask call. The task returned by PollForTask may come from any of the pipelines that match the workerGroup value passed in by the task runner and that was launched using the IAM user credentials specified by the task runner.

If tasks are ready in the work queue, PollForTask returns a response immediately. If no tasks are available in the queue, PollForTask uses long-polling and holds on to a poll connection for up to a 90 seconds during which time the first newly scheduled task is handed to the task runner. To accomodate this, set the socket timeout in your task runner to 90 seconds. The task runner should not call PollForTask again on the same workerGroup until it receives a response, and this may take up to 90 seconds.

Declaration Syntax

C#

    PollForTaskResponse PollForTask(
    	PollForTaskRequest pollForTaskRequest
    )

Parameters

pollForTaskRequest (PollForTaskRequest)
  Container for the necessary parameters to execute the PollForTask service method on AmazonDataPipeline.

Return Value
The response from the PollForTask service method, as returned by AmazonDataPipeline.
Exceptions

Exception | Condition
--- | ---
InternalServiceErrorException |
InvalidRequestException |
TaskNotFoundException |

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)