Browse Source

Merge branch '1.3.2-release' of https://github.com/apache/incubator-dolphinscheduler into 1.3.2-release

pull/3/MERGE
break60 4 years ago
parent
commit
f5acc15fc5
  1. 11
      dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/upgrade/UpgradeDao.java

11
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/upgrade/UpgradeDao.java

@ -297,11 +297,14 @@ public abstract class UpgradeDao extends AbstractBaseDao {
for (int i = 0 ;i < tasks.size() ; i++){ for (int i = 0 ;i < tasks.size() ; i++){
JSONObject task = tasks.getJSONObject(i); JSONObject task = tasks.getJSONObject(i);
Integer workerGroupId = task.getInteger("workerGroupId"); Integer workerGroupId = task.getInteger("workerGroupId");
if (workerGroupId == null || workerGroupId == -1) { if (workerGroupId != null) {
task.put("workerGroup", "default"); if (workerGroupId == -1) {
}else { task.put("workerGroup", "default");
task.put("workerGroup", oldWorkerGroupMap.get(workerGroupId)); } else {
task.put("workerGroup", oldWorkerGroupMap.get(workerGroupId));
}
} }
} }
jsonObject.remove(jsonObject.getString("tasks")); jsonObject.remove(jsonObject.getString("tasks"));

Loading…
Cancel
Save