mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 16:53:04 +08:00
chore(MetaAction): remove unused order attribute
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package work.slhaf.partner.core.action.entity;
|
package work.slhaf.partner.core.action.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -12,7 +11,7 @@ import static work.slhaf.partner.common.Constant.Path.ACTION_PROGRAM;
|
|||||||
* 行动链中的单一元素,封装了调用外部行动程序的必要信息与结果容器,可被{@link work.slhaf.partner.core.action.ActionCapability}执行
|
* 行动链中的单一元素,封装了调用外部行动程序的必要信息与结果容器,可被{@link work.slhaf.partner.core.action.ActionCapability}执行
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class MetaAction implements Comparable<MetaAction> {
|
public class MetaAction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 行动key,用于标识与定位行动程序
|
* 行动key,用于标识与定位行动程序
|
||||||
@@ -26,10 +25,6 @@ public class MetaAction implements Comparable<MetaAction> {
|
|||||||
* 行动结果,包括执行状态和相应内容(执行结果或者错误信息)
|
* 行动结果,包括执行状态和相应内容(执行结果或者错误信息)
|
||||||
*/
|
*/
|
||||||
private Result result = new Result();
|
private Result result = new Result();
|
||||||
/**
|
|
||||||
* 执行顺序,升序排列
|
|
||||||
*/
|
|
||||||
private int order;
|
|
||||||
/**
|
/**
|
||||||
* 是否IO密集,用于决定使用何种线程池
|
* 是否IO密集,用于决定使用何种线程池
|
||||||
*/
|
*/
|
||||||
@@ -48,11 +43,6 @@ public class MetaAction implements Comparable<MetaAction> {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int compareTo(@NotNull MetaAction metaAction) {
|
|
||||||
return this.order - metaAction.order;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public static class Result {
|
public static class Result {
|
||||||
private ResultStatus status = ResultStatus.WAITING;
|
private ResultStatus status = ResultStatus.WAITING;
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ public class DynamicActionGenerator extends AgentRunningSubModule<GeneratorInput
|
|||||||
tempAction.setKey(input.getKey());
|
tempAction.setKey(input.getKey());
|
||||||
tempAction.setParams(input.getParams());
|
tempAction.setParams(input.getParams());
|
||||||
tempAction.setIo(true);
|
tempAction.setIo(true);
|
||||||
tempAction.setOrder(-1);
|
|
||||||
tempAction.setType(MetaActionType.ORIGIN);
|
tempAction.setType(MetaActionType.ORIGIN);
|
||||||
return tempAction;
|
return tempAction;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ public class LocalRunnerClientTest {
|
|||||||
metaAction.setIo(false);
|
metaAction.setIo(false);
|
||||||
metaAction.setKey("hello_world");
|
metaAction.setKey("hello_world");
|
||||||
metaAction.setParams(Map.of("name", "origin_run"));
|
metaAction.setParams(Map.of("name", "origin_run"));
|
||||||
metaAction.setOrder(-1);
|
|
||||||
metaAction.setType(MetaActionType.ORIGIN);
|
metaAction.setType(MetaActionType.ORIGIN);
|
||||||
metaAction.setPath(Path.of("/home/slhaf/Projects/IdeaProjects/Projects/Partner/Partner-Main/src/test/java/resources/action/tmp/hello_world.py"));
|
metaAction.setPath(Path.of("/home/slhaf/Projects/IdeaProjects/Projects/Partner/Partner-Main/src/test/java/resources/action/tmp/hello_world.py"));
|
||||||
return metaAction;
|
return metaAction;
|
||||||
|
|||||||
Reference in New Issue
Block a user