Skip to content

Commit

Permalink
remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
alfred2g committed Nov 20, 2023
1 parent 5cf37ce commit ccc97ae
Showing 1 changed file with 0 additions and 54 deletions.
54 changes: 0 additions & 54 deletions samples/jobs/describe_job_execution/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,57 +329,3 @@ int main(int argc, char *argv[])

return 0;
}

// ====== new
/*
subAckedPromise = std::promise<void>();
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<void> publishDescribeJobExeCompletedPromise;
jobsClient.PublishDescribeJobExecution(publishRequest,
AWS_MQTT_QOS_AT_LEAST_ONCE,
publishHandler);
publishDescribeJobExeCompletedPromise.get_future().wait();
}
} else {
}
*/

0 comments on commit ccc97ae

Please sign in to comment.