private async Task <ActivityTask> PollAmazonSwfForActivityTaskAsync(TaskList taskList, string pollingIdentity, CancellationToken cancellationToken) { var request = taskList.ActivityTaskPollingRequest(_name, pollingIdentity); var response = await _simpleWorkflowClient.PollForActivityTaskAsync(request, cancellationToken); return(response?.ActivityTask); }
private async Task <PollForActivityTaskResponse> PollForActivityTaskAsync(string domain, string taskList, string workerId) { return(await _workflow.PollForActivityTaskAsync(new PollForActivityTaskRequest { Domain = domain, Identity = workerId, TaskList = new TaskList { Name = taskList } })); }
/// <summary> /// Poll the image processing activity task list to see if work needs to be done. /// </summary> /// <returns></returns> private async Task <ActivityTask> PollAsync() { PollForActivityTaskRequest request = new PollForActivityTaskRequest { Domain = _Domain, TaskList = new TaskList() { Name = _TaskList } }; Logger.Debug("TaskList: {0}", request.TaskList.Name); PollForActivityTaskResponse response = await _swfClient.PollForActivityTaskAsync(request, _cancellationToken); return(response.ActivityTask); }