From 284d983394602d457de70a33562d936084615e03 Mon Sep 17 00:00:00 2001 From: Jeff Zhu Date: Fri, 17 Nov 2017 11:27:08 +0800 Subject: [PATCH] =?UTF-8?q?#291=20=E4=BD=9C=E4=B8=9A=E5=90=AF=E7=94=A8/?= =?UTF-8?q?=E7=A6=81=E7=94=A8=E5=86=99=E5=85=A5=E5=88=B0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../saturn/job/console/service/impl/RestApiServiceImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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");