Skip to content

Commit 5345af4

Browse files
authored
Merge pull request #42689 from asa3311/sync-zh-53
[zh] Replace codenew with code for 6 files in content/zh-cn/docs/tasks/job/
2 parents d4fd558 + 61b9264 commit 5345af4

6 files changed

+11
-11
lines changed

content/zh-cn/docs/tasks/job/automated-tasks-with-cron-jobs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Here is a manifest for a CronJob that runs a simple demonstration task every min
3838
CronJob 需要一个配置文件。
3939
以下是针对一个 CronJob 的清单,该 CronJob 每分钟运行一个简单的演示任务:
4040

41-
{{< codenew file="application/job/cronjob.yaml" >}}
41+
{{% code file="application/job/cronjob.yaml" %}}
4242

4343
<!--
4444
Run the example CronJob by using this command:

content/zh-cn/docs/tasks/job/coarse-parallel-processing-work-queue.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ example program:
302302
我们将用 `amqp-consume` 实用程序从队列中读取消息并运行实际的程序。
303303
这里给出一个非常简单的示例程序:
304304

305-
{{< codenew language="python" file="application/job/rabbitmq/worker.py" >}}
305+
{{% code language="python" file="application/job/rabbitmq/worker.py" %}}
306306

307307
<!--
308308
Give the script execution permission:
@@ -371,7 +371,7 @@ image to match the name you used, and call it `./job.yaml`.
371371

372372
这里给出一个 Job 定义 YAML 文件。你将需要拷贝一份 Job 并编辑该镜像以匹配你使用的名称,保存为 `./job.yaml`
373373

374-
{{< codenew file="application/job/rabbitmq/job.yaml" >}}
374+
{{% code file="application/job/rabbitmq/job.yaml" %}}
375375

376376
<!--
377377
In this example, each pod works on one item from the queue and then exits.

content/zh-cn/docs/tasks/job/fine-parallel-processing-work-queue.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ client library to get work. Here it is:
194194
-->
195195
Job 中每个 Pod 内的 “工作程序” 使用工作队列客户端库获取工作。具体如下:
196196

197-
{{< codenew language="python" file="application/job/redis/worker.py" >}}
197+
{{% code language="python" file="application/job/redis/worker.py" %}}
198198

199199
<!--
200200
You could also download [`worker.py`](/examples/application/job/redis/worker.py),
@@ -257,7 +257,7 @@ Here is the job definition:
257257

258258
这是 Job 定义:
259259

260-
{{< codenew file="application/job/redis/job.yaml" >}}
260+
{{% code file="application/job/redis/job.yaml" %}}
261261

262262
<!--
263263
Be sure to edit the job template to

content/zh-cn/docs/tasks/job/indexed-parallel-processing-static.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Here is a sample Job manifest that uses `Indexed` completion mode:
138138

139139
这是一个使用 `Indexed` 完成模式的示例 Job 清单:
140140

141-
{{< codenew language="yaml" file="application/job/indexed-job.yaml" >}}
141+
{{% code language="yaml" file="application/job/indexed-job.yaml" %}}
142142

143143
<!--
144144
In the example above, you use the builtin `JOB_COMPLETION_INDEX` environment
@@ -169,7 +169,7 @@ like shown in the following example:
169169
[使用 Downward API 将注解值作为卷文件传递](/zh-cn/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/#store-pod-fields)
170170
如下例所示:
171171

172-
{{< codenew language="yaml" file="application/job/indexed-job-vol.yaml" >}}
172+
{{% code language="yaml" file="application/job/indexed-job-vol.yaml" %}}
173173

174174
<!--
175175
## Running the Job

content/zh-cn/docs/tasks/job/parallel-processing-expansion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ First, download the following template of a job to a file called `job-tmpl.yaml`
7676
-->
7777
首先,将以下作业模板下载到名为 `job-tmpl.yaml` 的文件中。
7878

79-
{{< codenew file="application/job/job-tmpl.yaml" >}}
79+
{{% code file="application/job/job-tmpl.yaml" %}}
8080

8181
```shell
8282
# 使用 curl 下载 job-tmpl.yaml

content/zh-cn/docs/tasks/job/pod-failure-policy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Pod 失效策略来避免不必要的 Pod 重启。
7272

7373
首先,基于配置创建一个 Job:
7474

75-
{{< codenew file="/controllers/job-pod-failure-policy-failjob.yaml" >}}
75+
{{% code file="/controllers/job-pod-failure-policy-failjob.yaml" %}}
7676

7777
<!--
7878
by running:
@@ -150,7 +150,7 @@ node while the Pod is running on it (within 90s since the Pod is scheduled).
150150
-->
151151
1. 基于配置创建 Job:
152152

153-
{{< codenew file="/controllers/job-pod-failure-policy-ignore.yaml" >}}
153+
{{% code file="/controllers/job-pod-failure-policy-ignore.yaml" %}}
154154

155155
<!--
156156
by running:
@@ -250,7 +250,7 @@ deleted pods, in the `Pending` phase, to a terminal phase
250250
-->
251251
1. 首先基于配置创建一个 Job:
252252

253-
{{< codenew file="/controllers/job-pod-failure-policy-config-issue.yaml" >}}
253+
{{% code file="/controllers/job-pod-failure-policy-config-issue.yaml" %}}
254254

255255
<!--
256256
by running:

0 commit comments

Comments
 (0)