From 4c9921f752c86d01975ff9ee5109a0f5e372bfcd Mon Sep 17 00:00:00 2001 From: WYAOBO <50188429+WYAOBO@users.noreply.github.com> Date: Fri, 2 Sep 2022 18:05:10 +0800 Subject: [PATCH] =?UTF-8?q?Update=20KnowStreaming=20Task=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E7=AE=80=E4=BB=8B.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/dev_guide/KnowStreaming Task模块简介.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/dev_guide/KnowStreaming Task模块简介.md b/docs/dev_guide/KnowStreaming Task模块简介.md index abe2b81d..af87237b 100644 --- a/docs/dev_guide/KnowStreaming Task模块简介.md +++ b/docs/dev_guide/KnowStreaming Task模块简介.md @@ -41,11 +41,15 @@ Task模块基于Logi-Job的广播模式与抢占模式,分别实现了任务 consensual = ConsensualEnum.RANDOM, // 这里一定要设置为RANDOM timeout = 6 * 60) public class TestJob implements Job { + @Override - public TaskResult execute(JobContext jobContext) throws Exception { + public TaskResult execute(JobContext jobContext) throws Exception { + System.out.println("测试定时任务运行中"); return new TaskResult(); + } + } ``` @@ -69,12 +73,16 @@ public class TestJob implements Job { autoRegister = true, consensual = ConsensualEnum.BROADCAST, // 这里一定要设置为BROADCAST timeout = 6 * 60) -public class TestJob implements Job { +public class TestJob implements Job { + @Override - public TaskResult execute(JobContext jobContext) throws Exception { + public TaskResult execute(JobContext jobContext) throws Exception { + System.out.println("测试定时任务运行中"); return new TaskResult(); + } + } ```