Skip to content

Commit

Permalink
format: clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
alfred2g committed Nov 29, 2023
1 parent c1f1e64 commit 29d0c81
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions servicetests/tests/JobsExecution/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ int main(int argc, char *argv[])
builder->WithClientConnectionFailureCallback([&connectionPromise](
const Mqtt5::OnConnectionFailureEventData &eventData) {
fprintf(
stdout, "Mqtt5 Client connection failed with error: %s.\n", aws_error_debug_str(eventData.errorCode));
stdout, "Mqtt5 Client connection failed with error: %s.\n", aws_error_debug_str(eventData.errorCode));
connectionPromise.set_value(false);
});
builder->WithClientStoppedCallback([&stoppedPromise](const Mqtt5::OnStoppedEventData &) {
Expand Down Expand Up @@ -451,16 +451,17 @@ void getAvailableJobs(Aws::Crt::String thingName, IotJobsClient &jobsClient)
{
fprintf(stderr, "Error %d occurred\n", ioErr);
}
for (JobExecutionSummary job : response->InProgressJobs.value()) {
for (JobExecutionSummary job : response->InProgressJobs.value())
{
availableJobs.push_back(job.JobId.value());
fprintf(stderr, "In Progress jobs %s\n", job.JobId->c_str());
}
for (JobExecutionSummary job : response->QueuedJobs.value()) {
for (JobExecutionSummary job : response->QueuedJobs.value())
{
availableJobs.push_back(job.JobId.value());
fprintf(stderr, "Queued jobs %s\n", job.JobId->c_str());
}
getResponse.set_value();

};

auto err_handler = [&](Aws::Iotjobs::RejectedError *rejectedError, int ioErr) {
Expand Down Expand Up @@ -488,17 +489,17 @@ void getAvailableJobs(Aws::Crt::String thingName, IotJobsClient &jobsClient)
};

jobsClient.SubscribeToGetPendingJobExecutionsAccepted(
subscriptionRequest, AWS_MQTT_QOS_AT_LEAST_ONCE, handler, publishHandler);
subscriptionRequest, AWS_MQTT_QOS_AT_LEAST_ONCE, handler, publishHandler);
publishDescribeJobExeCompletedPromise.get_future().wait();

jobsClient.SubscribeToGetPendingJobExecutionsRejected(
subscriptionRequest, AWS_MQTT_QOS_AT_LEAST_ONCE, err_handler, publishHandler);
subscriptionRequest, AWS_MQTT_QOS_AT_LEAST_ONCE, err_handler, publishHandler);
publishDescribeJobExeCompletedPromise.get_future().wait();

GetPendingJobExecutionsRequest publishRequest;
publishRequest.ThingName = thingName;
jobsClient.PublishGetPendingJobExecutions(
publishRequest, AWS_MQTT_QOS_AT_LEAST_ONCE, publishHandler);
publishRequest, AWS_MQTT_QOS_AT_LEAST_ONCE, publishHandler);
publishDescribeJobExeCompletedPromise.get_future().wait();

getResponse.get_future().wait();
Expand Down

0 comments on commit 29d0c81

Please sign in to comment.