Skip to content

Commit

Permalink
Add sample worker for failing
Browse files Browse the repository at this point in the history
  • Loading branch information
boney9 committed Sep 27, 2023
1 parent db48a5c commit 11c878f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public TaskResult execute(Task task) {
if(failedCount >= timesToFail) {
result.addOutputData("outputVal", "This task completed failing for configured number of times - " + timesToFail);
result.setStatus(TaskResult.Status.COMPLETED);
return result;
}
result.addOutputData("failedCount", ++failedCount);
result.addOutputData("outputVal", "This task fails (for testing) for " + timesToFail + " times");
Expand Down

0 comments on commit 11c878f

Please sign in to comment.