Skip to content

Commit eca70ca

Browse files
committed
add message on skip
1 parent 492655c commit eca70ca

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

core/src/main/java/com/flowci/core/job/domain/Step.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
)
4949
public class Step implements Executed {
5050

51+
public static final String MessageSkippedOnCondition = "Skipped due to condition";
52+
5153
@Id
5254
private String id;
5355

core/src/main/java/com/flowci/core/job/manager/JobActionManagerImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,8 @@ private void dispatch(Job job, Agent agent) throws ScriptException {
646646
if (!canExecute) {
647647
nextStep.setStartAt(new Date());
648648
nextStep.setFinishAt(new Date());
649+
nextStep.setError(Step.MessageSkippedOnCondition);
650+
649651
updateJobTime(job, nextStep, tree, next);
650652

651653
setJobStatusAndSave(job, Job.Status.RUNNING, null);
@@ -709,6 +711,7 @@ private boolean toNextStep(JobSmContext context) throws ScriptException {
709711
if (!canExecute) {
710712
nextStep.setStartAt(new Date());
711713
nextStep.setFinishAt(new Date());
714+
nextStep.setError(Step.MessageSkippedOnCondition);
712715
updateJobTime(job, nextStep, tree, next.get());
713716

714717
setJobStatusAndSave(job, Job.Status.RUNNING, null);

0 commit comments

Comments
 (0)