From fa2a7c0822b75b32a7cddcce169d7f4fdf6a3a68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=98=8E?= Date: Tue, 31 May 2022 10:46:24 +0800 Subject: [PATCH] =?UTF-8?q?work-scheduler=E7=9B=B8=E5=85=B3=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈明 --- .../reference/apis/js-apis-workScheduler.md | 12 ++++++------ .../work-scheduler/work-scheduler-dev-guide.md | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-workScheduler.md b/zh-cn/application-dev/reference/apis/js-apis-workScheduler.md index 1eeefe3c9a..f932bfda15 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-workScheduler.md +++ b/zh-cn/application-dev/reference/apis/js-apis-workScheduler.md @@ -100,7 +100,7 @@ getWorkStatus(workId: number, callback : AsyncCallback\): void ``` workScheduler.getWorkStatus(50, (err, res) => { if (err) { - console.info('workschedulerLog getWorkStatus failed, because:' + err.data); + console.info('workschedulerLog getWorkStatus failed, because:' + err.code); } else { for (let item in res) { console.info('workschedulerLog getWorkStatus success,' + item + ' is:' + res[item]); @@ -136,7 +136,7 @@ getWorkStatus(workId: number): Promise\ console.info('workschedulerLog getWorkStatus success,' + item + ' is:' + res[item]); } }).catch((err) => { - console.info('workschedulerLog getWorkStatus failed, because:' + err.data); + console.info('workschedulerLog getWorkStatus failed, because:' + err.code); }) ``` @@ -164,7 +164,7 @@ obtainAllWorks(callback : AsyncCallback\): Array\ ``` workScheduler.obtainAllWorks((err, res) =>{ if (err) { - console.info('workschedulerLog obtainAllWorks failed, because:' + err.data); + console.info('workschedulerLog obtainAllWorks failed, because:' + err.code); } else { console.info('workschedulerLog obtainAllWorks success, data is:' + JSON.stringify(res)); } @@ -190,7 +190,7 @@ obtainAllWorks(): Promise> workScheduler.obtainAllWorks().then((res) => { console.info('workschedulerLog obtainAllWorks success, data is:' + JSON.stringify(res)); }).catch((err) => { - console.info('workschedulerLog obtainAllWorks failed, because:' + err.data); + console.info('workschedulerLog obtainAllWorks failed, because:' + err.code); }) ``` @@ -233,7 +233,7 @@ isLastWorkTimeOut(workId: number, callback : AsyncCallback\): boolean ``` workScheduler.isLastWorkTimeOut(500, (err, res) =>{ if (err) { - console.info('workschedulerLog isLastWorkTimeOut failed, because:' + err.data); + console.info('workschedulerLog isLastWorkTimeOut failed, because:' + err.code); } else { console.info('workschedulerLog isLastWorkTimeOut success, data is:' + res); } @@ -267,7 +267,7 @@ isLastWorkTimeOut(workId: number): Promise\ console.info('workschedulerLog isLastWorkTimeOut success, data is:' + res); }) .catch(err => { - console.info('workschedulerLog isLastWorkTimeOut failed, because:' + err.data); + console.info('workschedulerLog isLastWorkTimeOut failed, because:' + err.code); }); ``` diff --git a/zh-cn/application-dev/work-scheduler/work-scheduler-dev-guide.md b/zh-cn/application-dev/work-scheduler/work-scheduler-dev-guide.md index 43cabe327f..e8f504d8be 100644 --- a/zh-cn/application-dev/work-scheduler/work-scheduler-dev-guide.md +++ b/zh-cn/application-dev/work-scheduler/work-scheduler-dev-guide.md @@ -115,7 +115,7 @@ function onWorkStop(work: WorkInfo): void; | 延迟调度任务结束回调 workScheduler.getWorkStatus(50, (err, res) => { if (err) { - console.info('workschedulerLog getWorkStatus failed, because:' + err.data); + console.info('workschedulerLog getWorkStatus failed, because:' + err.code); } else { for (let item in res) { console.info('workschedulerLog getWorkStatuscallback success,' + item + ' is:' + res[item]); @@ -131,7 +131,7 @@ function onWorkStop(work: WorkInfo): void; | 延迟调度任务结束回调 console.info('workschedulerLog getWorkStatus success,' + item + ' is:' + res[item]); } }).catch((err) => { - console.info('workschedulerLog getWorkStatus failed, because:' + err.data); + console.info('workschedulerLog getWorkStatus failed, because:' + err.code); }) @@ -141,7 +141,7 @@ function onWorkStop(work: WorkInfo): void; | 延迟调度任务结束回调 workScheduler.obtainAllWorks((err, res) =>{ if (err) { - console.info('workschedulerLog obtainAllWorks failed, because:' + err.data); + console.info('workschedulerLog obtainAllWorks failed, because:' + err.code); } else { console.info('workschedulerLog obtainAllWorks success, data is:' + JSON.stringify(res)); } @@ -152,7 +152,7 @@ function onWorkStop(work: WorkInfo): void; | 延迟调度任务结束回调 workScheduler.obtainAllWorks().then((res) => { console.info('workschedulerLog obtainAllWorks success, data is:' + JSON.stringify(res)); }).catch((err) => { - console.info('workschedulerLog obtainAllWorks failed, because:' + err.data); + console.info('workschedulerLog obtainAllWorks failed, because:' + err.code); }) **停止并清除任务** @@ -166,7 +166,7 @@ function onWorkStop(work: WorkInfo): void; | 延迟调度任务结束回调 workScheduler.isLastWorkTimeOut(500, (err, res) =>{ if (err) { - console.info('workschedulerLog isLastWorkTimeOut failed, because:' + err.data); + console.info('workschedulerLog isLastWorkTimeOut failed, because:' + err.code); } else { console.info('workschedulerLog isLastWorkTimeOut success, data is:' + res); } @@ -179,6 +179,6 @@ function onWorkStop(work: WorkInfo): void; | 延迟调度任务结束回调 console.info('workschedulerLog isLastWorkTimeOut success, data is:' + res); }) .catch(err => { - console.info('workschedulerLog isLastWorkTimeOut failed, because:' + err.data); + console.info('workschedulerLog isLastWorkTimeOut failed, because:' + err.code); }); }) \ No newline at end of file -- GitLab