Skip to content

Commit

Permalink
[BugFix][Admin]Fix dolphinscheduler calls dinky tasks and concurrent … (
Browse files Browse the repository at this point in the history
#4010)

Co-authored-by: 黄苏苏 <[email protected]>
  • Loading branch information
dagenjun and 黄苏苏 authored Dec 6, 2024
1 parent 19a061c commit 75513e5
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@

@AllArgsConstructor
public abstract class BaseTask {

private static final Set<Class<?>> taskRegistry =
ClassUtil.scanPackageBySuper(BaseTask.class.getPackage().getName(), BaseTask.class);

final TaskDTO task;

public abstract JobResult execute() throws Exception;
Expand All @@ -58,9 +62,7 @@ public ObjectNode getJobPlan() throws NotSupportExplainExcepition {
}

public static BaseTask getTask(TaskDTO taskDTO) {
Set<Class<?>> classes =
ClassUtil.scanPackageBySuper(BaseTask.class.getPackage().getName(), BaseTask.class);
for (Class<?> clazz : classes) {
for (Class<?> clazz : taskRegistry) {
SupportDialect annotation = clazz.getAnnotation(SupportDialect.class);
if (annotation != null) {
for (Dialect dialect : annotation.value()) {
Expand Down

0 comments on commit 75513e5

Please sign in to comment.