Skip to content

Commit

Permalink
Fix run parameter and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
alfred2g committed Nov 22, 2023
1 parent 0e883d7 commit cccee4c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci_run_jobs_cfg.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
{
"name": "--job_id",
"data": "CI_Jobs_Thing_Job_1"
},
{
"name": "--is_ci",
"data": "true"
}
]
}
4 changes: 4 additions & 0 deletions .github/workflows/ci_run_jobs_mqtt5_cfg.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
{
"name": "--job_id",
"data": "CI_Jobs_Thing_Job_1"
},
{
"name": "--is_ci",
"data": "true"
}
]
}
19 changes: 14 additions & 5 deletions samples/jobs/mqtt5_describe_job_execution/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,16 @@ int main(int argc, char *argv[])
{
auto OnSubscribeToStartNextPendingJobExecutionAcceptedResponse =
[&](StartNextJobExecutionResponse *response, int ioErr) {
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();

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();
};

Expand Down Expand Up @@ -269,6 +274,10 @@ int main(int argc, char *argv[])
subscriptionRequest.JobId = currentJobId;

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

0 comments on commit cccee4c

Please sign in to comment.