mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 16:53:04 +08:00
refactor(ActionScheduler): rename entry method into schedule
This commit is contained in:
@@ -53,7 +53,7 @@ public class ActionDispatcher extends PostRunningAbstractAgentModuleAbstract {
|
||||
}
|
||||
}
|
||||
actionExecutor.execute(new ActionExecutorInput(immediateActions));
|
||||
actionScheduler.execute(scheduledActions);
|
||||
actionScheduler.schedule(scheduledActions);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ public class ActionExecutor extends AbstractAgentModule.Sub<ActionExecutorInput,
|
||||
// 如果是 ScheduledActionData, 则重置 ActionData 内容,记录执行历史与最终结果
|
||||
if (executableAction instanceof SchedulableExecutableAction scheduledActionData) {
|
||||
scheduledActionData.recordAndReset();
|
||||
actionScheduler.execute(Set.of(scheduledActionData));
|
||||
actionScheduler.schedule(Set.of(scheduledActionData));
|
||||
} else {
|
||||
executableAction.setStatus(Status.SUCCESS);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ class ActionScheduler : AbstractAgentModule.Standalone() {
|
||||
})
|
||||
}
|
||||
|
||||
fun execute(input: Set<Schedulable>) = schedulerScope.launch {
|
||||
fun schedule(input: Set<Schedulable>) = schedulerScope.launch {
|
||||
for (schedulableData in input) {
|
||||
log.debug("New data to schedule: {}", schedulableData)
|
||||
timeWheel.schedule(schedulableData)
|
||||
|
||||
Reference in New Issue
Block a user