Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
5b7d4f7c
D
Docs
项目概览
OpenHarmony
/
Docs
12 个月 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5b7d4f7c
编写于
5月 30, 2023
作者:
G
Gloria
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update docs against 18393+17759
Signed-off-by: wusongqing<wusongqing@huawei.com>
上级
6d25ce1b
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
21 addition
and
21 deletion
+21
-21
en/application-dev/reference/apis/js-apis-resourceschedule-workScheduler.md
.../reference/apis/js-apis-resourceschedule-workScheduler.md
+15
-15
en/application-dev/reference/errorcodes/errorcode-backgroundTaskMgr.md
...n-dev/reference/errorcodes/errorcode-backgroundTaskMgr.md
+5
-5
en/application-dev/reference/errorcodes/errorcode-workScheduler.md
...ation-dev/reference/errorcodes/errorcode-workScheduler.md
+1
-1
未找到文件。
en/application-dev/reference/apis/js-apis-resourceschedule-workScheduler.md
浏览文件 @
5b7d4f7c
...
...
@@ -39,7 +39,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes
| 9700001 | Memory operation failed. |
| 9700002 | Parcel operation failed. |
| 9700003 | System service operation failed. |
| 9700004 | Check
ing
workInfo failed. |
| 9700004 | Check workInfo failed. |
| 9700005 | StartWork failed. |
...
...
@@ -80,7 +80,7 @@ Instructs the **WorkSchedulerService** to stop the specified task.
| Name | Type | Mandatory | Description |
| ---------- | --------------------- | ---- | ---------- |
| work |
[
WorkInfo
](
#workinfo
)
| Yes | Task to stop. |
| needCancel | boolean |
Yes | Whether to cancel the task
.|
| needCancel | boolean |
No | Whether to cancel the task. The default value is
**false**
.|
**Error codes**
...
...
@@ -91,7 +91,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes
| 9700001 | Memory operation failed. |
| 9700002 | Parcel operation failed. |
| 9700003 | System service operation failed. |
| 9700004 | Check
ing
workInfo failed. |
| 9700004 | Check workInfo failed. |
**Example**
...
...
@@ -118,7 +118,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes
}
```
## workScheduler.getWorkStatus
:callback
## workScheduler.getWorkStatus
getWorkStatus(workId: number, callback : AsyncCallback
\<
WorkInfo>): void
Obtains the latest task status. This API uses an asynchronous callback to return the result.
...
...
@@ -141,7 +141,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes
| 9700001 | Memory operation failed. |
| 9700002 | Parcel operation failed. |
| 9700003 | System service operation failed. |
| 9700004 | Check
ing
workInfo failed. |
| 9700004 | Check workInfo failed. |
**Example**
...
...
@@ -161,7 +161,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes
}
```
## workScheduler.getWorkStatus
:promise
## workScheduler.getWorkStatus
getWorkStatus(workId: number): Promise
\<
WorkInfo>
Obtains the latest task status. This API uses a promise to return the result.
...
...
@@ -189,7 +189,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes
| 9700001 | Memory operation failed. |
| 9700002 | Parcel operation failed. |
| 9700003 | System service operation failed. |
| 9700004 | Check
ing
workInfo failed. |
| 9700004 | Check workInfo failed. |
**Example**
...
...
@@ -207,7 +207,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes
}
```
## workScheduler.obtainAllWorks
:callback
## workScheduler.obtainAllWorks
obtainAllWorks(callback : AsyncCallback
\<
void>): Array
\<
WorkInfo>
Obtains all tasks associated with this application. This API uses an asynchronous callback to return the result.
...
...
@@ -252,8 +252,8 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes
}
```
## workScheduler.obtainAllWorks
:promise
obtainAllWorks(): Promise
<Array
\<
WorkInfo
>
>
## workScheduler.obtainAllWorks
obtainAllWorks(): Promise
\
<
Array
\<
WorkInfo>>
Obtains all tasks associated with this application. This API uses a promise to return the result.
...
...
@@ -317,7 +317,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes
}
```
## workScheduler.isLastWorkTimeOut
:callback
## workScheduler.isLastWorkTimeOut
isLastWorkTimeOut(workId: number, callback : AsyncCallback
\<
void>): boolean
Checks whether the last execution of the specified task timed out. This API uses an asynchronous callback to return the result.
...
...
@@ -346,7 +346,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes
| 9700001 | Memory operation failed. |
| 9700002 | Parcel operation failed. |
| 9700003 | System service operation failed. |
| 9700004 | Check
ing
workInfo failed. |
| 9700004 | Check workInfo failed. |
**Example**
...
...
@@ -364,7 +364,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes
}
```
## workScheduler.isLastWorkTimeOut
:promise
## workScheduler.isLastWorkTimeOut
isLastWorkTimeOut(workId: number): Promise
\<
boolean>
Checks whether the last execution of the specified task timed out. This API uses a promise to return the result.
...
...
@@ -392,7 +392,7 @@ For details about the error codes, see [workScheduler Error Codes](../errorcodes
| 9700001 | Memory operation failed. |
| 9700002 | Parcel operation failed. |
| 9700003 | System service operation failed. |
| 9700004 | Check
ing
workInfo failed. |
| 9700004 | Check workInfo failed. |
**Example**
...
...
@@ -432,7 +432,7 @@ Provides detailed information about the task. For details about the constraints
| isPersisted | boolean | No | Whether to enable persistent storage for the task. |
| isDeepIdle | boolean | No | Whether the device needs to enter the idle state. |
| idleWaitTime | number | No | Time to wait in the idle state. |
| parameters | {[key: string]: number
| string
| boolean} | No | Carried parameters. |
| parameters | {[key: string]: number
\|
string
\
|
boolean} | No | Carried parameters. |
## NetworkType
Enumerates the network types that can trigger the task.
...
...
en/application-dev/reference/errorcodes/errorcode-backgroundTaskMgr.md
浏览文件 @
5b7d4f7c
...
...
@@ -38,7 +38,7 @@ Try again later or restart the device.
**Error Message**
I
PC
failed.
I
nner transact
failed.
**Possible Causes**
...
...
@@ -67,7 +67,7 @@ Try again later or restart the device.
**Error Message**
Continuous
task verification failed.
Background
task verification failed.
**Possible Causes**
...
...
@@ -120,7 +120,7 @@ Task storage failed.
**Error Message**
Caller information verification failed
for a transient task
.
Caller information verification failed.
**Possible Causes**
...
...
@@ -138,7 +138,7 @@ Caller information verification failed for a transient task.
**Error Message**
Transient
task verification failed.
Background
task verification failed.
**Possible Causes**
...
...
@@ -157,7 +157,7 @@ Transient task verification failed.
**Error Message**
Caller information verification failed
when applying for efficiency resources
.
Caller information verification failed.
**Possible Causes**
...
...
en/application-dev/reference/errorcodes/errorcode-workScheduler.md
浏览文件 @
5b7d4f7c
...
...
@@ -53,7 +53,7 @@ Try again later or restart the device.
**Error Message**
Check
ing
workInfo failed.
Check workInfo failed.
**Possible Causes**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录