diff --git a/samples/jobs/describe_job_execution/main.cpp b/samples/jobs/describe_job_execution/main.cpp index f0f6b62b2..a856a3711 100644 --- a/samples/jobs/describe_job_execution/main.cpp +++ b/samples/jobs/describe_job_execution/main.cpp @@ -329,57 +329,3 @@ int main(int argc, char *argv[]) return 0; } - -// ====== new -/* - subAckedPromise = std::promise(); - auto subscribePendingJobsHandler = [&](GetPendingJobExecutionsResponse * response, - int ioErr) - { - for (JobExecutionSummary job : response->QueuedJobs.value()) - { - availableJobs.push_back(job.JobId); - } - for (JobExecutionSummary job : response->InProgressJobs.value()) - { - availableJobs.push_back(job.JobId); - } - }; - - GetPendingJobExecutionsSubscriptionRequest getPendingJobExecutionsSubscriptionRequest; - getPendingJobExecutionsSubscriptionRequest.ThingName = cmdData.input_thingName; - - jobsClient.SubscribeToGetPendingJobExecutionsAccepted( - getPendingJobExecutionsSubscriptionRequest, - AWS_MQTT_QOS_AT_LEAST_ONCE, - subscribePendingJobsHandler, - subAckHandler); - subAckedPromise.get_future().wait(); - - if (!availableJobs.empty()) - { - for (auto jobid : availableJobs) - { - DescribeJobExecutionSubscriptionRequest subscriptionRequest; - - subscriptionRequest.ThingName = cmdData.input_thingName; - subscriptionRequest.JobId = jobid.value(); - - DescribeJobExecutionRequest publishRequest; - publishRequest.ThingName = cmdData.input_thingName; - publishRequest.JobId = jobid.value(); - publishRequest.IncludeJobDocument = true; - publishRequest.ExecutionNumber = 1L; - Aws::Crt::UUID uuid; - describeJobExecutionRequest.ClientToken = uuid.ToString(); - - std::promise publishDescribeJobExeCompletedPromise; - jobsClient.PublishDescribeJobExecution(publishRequest, - AWS_MQTT_QOS_AT_LEAST_ONCE, - publishHandler); - publishDescribeJobExeCompletedPromise.get_future().wait(); - } - } else { - } - -*/