diff --git a/saturn-console/src/main/java/com/vip/saturn/job/console/service/impl/RestApiServiceImpl.java b/saturn-console/src/main/java/com/vip/saturn/job/console/service/impl/RestApiServiceImpl.java index 17e114550..468a949b4 100644 --- a/saturn-console/src/main/java/com/vip/saturn/job/console/service/impl/RestApiServiceImpl.java +++ b/saturn-console/src/main/java/com/vip/saturn/job/console/service/impl/RestApiServiceImpl.java @@ -391,8 +391,7 @@ public void call(CuratorRepository.CuratorFrameworkOp curatorFrameworkOp) long ctime = curatorFrameworkOp.getCtime(enabledNodePath); long mtime = curatorFrameworkOp.getMtime(enabledNodePath); checkUpdateStatusToEnableAllowed(ctime, mtime); - - curatorFrameworkOp.update(enabledNodePath, "true"); + jobOperationService.setJobEnabledState(jobName, true); } } }); @@ -410,8 +409,7 @@ public void call(CuratorRepository.CuratorFrameworkOp curatorFrameworkOp) if (Boolean.valueOf(enabled)) { long mtime = curatorFrameworkOp.getMtime(enabledNodePath); checkUpdateStatusToDisableAllowed(mtime); - - curatorFrameworkOp.update(enabledNodePath, "false"); + jobOperationService.setJobEnabledState(jobName, false); } else { throw new SaturnJobConsoleHttpException(HttpStatus.CREATED.value(), "The job is already disable");