Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
alfred2g committed Nov 22, 2023
1 parent cccee4c commit 8cb7285
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions samples/jobs/mqtt5_describe_job_execution/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,18 @@ int main(int argc, char *argv[])
{
auto OnSubscribeToStartNextPendingJobExecutionAcceptedResponse =
[&](StartNextJobExecutionResponse *response, int ioErr) {
if (ioErr)
{
fprintf(stderr, "Error %d occurred\n", ioErr);
}
if (response) {
fprintf(stdout, "Start Job %s\n", response->Execution.value().JobId.value().c_str());
currentJobId = response->Execution->JobId.value();
currentExecutionNumber = response->Execution->ExecutionNumber.value();
currentVersionNumber = response->Execution->VersionNumber.value();
}
pendingExecutionPromise.set_value();
if (ioErr)
{
fprintf(stderr, "Error %d occurred\n", ioErr);
}
if (response)
{
fprintf(stdout, "Start Job %s\n", response->Execution.value().JobId.value().c_str());
currentJobId = response->Execution->JobId.value();
currentExecutionNumber = response->Execution->ExecutionNumber.value();
currentVersionNumber = response->Execution->VersionNumber.value();
}
pendingExecutionPromise.set_value();
};

StartNextPendingJobExecutionSubscriptionRequest subscriptionRequest;
Expand Down Expand Up @@ -275,7 +276,8 @@ int main(int argc, char *argv[])

auto subscribeHandler = [&](UpdateJobExecutionResponse *response, int ioErr) {
(void) response;
if (ioErr) {
if (ioErr)
{
fprintf(stderr, "Error %d occurred\n", ioErr);
}
fprintf(stdout, "Marked job %s currentJobId SUCCEEDED", currentJobId.c_str());
Expand Down

0 comments on commit 8cb7285

Please sign in to comment.