执行引擎部分代码(未完成)
This commit is contained in:
parent
49dbe611f2
commit
69d168f4a8
@ -14,12 +14,14 @@ public class SerialDispatcher implements BaseDispatcher {
|
||||
private SecondStageRunContext stageRunContext;
|
||||
private List<PipTask> taskList;
|
||||
private CountDownLatch latch;
|
||||
private String triggerModel;
|
||||
|
||||
public SerialDispatcher(SecondStageRunContext stageRunContext, CountDownLatch latch) {
|
||||
this.stageRunContext = stageRunContext;
|
||||
PipBaseElement contextDef = stageRunContext.getContextDef();
|
||||
if (contextDef instanceof PipStage) {
|
||||
this.taskList = ((PipStage)contextDef).getTaskValues();
|
||||
if (contextDef instanceof PipStage secondStage) {
|
||||
this.triggerModel = secondStage.getTriggerMode();
|
||||
this.taskList = secondStage.getTaskValues();
|
||||
}
|
||||
this.latch = latch;
|
||||
}
|
||||
@ -34,6 +36,8 @@ public class SerialDispatcher implements BaseDispatcher {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
// TODO 检测触发方式如果需要手动触发,挂起当前stage,等待父级执行相应操作
|
||||
// TODO 看看需要内存入库还是忽略掉当前执行,进行入库(countDown放行)
|
||||
dispatch();
|
||||
latch.countDown();
|
||||
} catch (Exception e) {
|
||||
|
@ -30,6 +30,10 @@ public class PipStage extends PipBaseElement {
|
||||
|
||||
//@ApiProperty(name = "code",desc="是否是源码")
|
||||
private Boolean code = false;
|
||||
/**
|
||||
* 触发方式 0-手动触发/1-自动触发
|
||||
* */
|
||||
private String triggerMode;
|
||||
|
||||
//@ApiProperty(name = "taskValues",desc="阶段任务")
|
||||
@TableField(exist = false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user