Skip to content

Commit d6b02c5

Browse files
committed
[zh] Sync fine-parallel-processing-work-queue.md
1 parent b067305 commit d6b02c5

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

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

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ Here is an overview of the steps in this example:
3131

3232
<!--
3333
1. **Start a storage service to hold the work queue.** In this example, we use Redis to store
34-
our work items. In the previous example, we used RabbitMQ. In this example, we use Redis and
35-
a custom work-queue client library because AMQP does not provide a good way for clients to
36-
detect when a finite-length work queue is empty. In practice you would set up a store such
37-
as Redis once and reuse it for the work queues of many jobs, and other things.
34+
our work items. In the previous example, we used RabbitMQ. In this example, we use Redis and
35+
a custom work-queue client library because AMQP does not provide a good way for clients to
36+
detect when a finite-length work queue is empty. In practice you would set up a store such
37+
as Redis once and reuse it for the work queues of many jobs, and other things.
3838
-->
3939

4040
1. **启动存储服务用于保存工作队列。** 在这个例子中,我们使用 Redis 来存储工作项。
@@ -52,7 +52,7 @@ Here is an overview of the steps in this example:
5252

5353
<!--
5454
1. **Start a Job that works on tasks from the queue**. The Job starts several pods. Each pod takes
55-
one task from the message queue, processes it, and repeats until the end of the queue is reached.
55+
one task from the message queue, processes it, and repeats until the end of the queue is reached.
5656
-->
5757
3. **启动一个 Job 对队列中的任务进行处理**。这个 Job 启动了若干个 Pod。
5858
每个 Pod 从消息队列中取出一个工作任务,处理它,然后重复,直到到达队列的尾部。
@@ -61,6 +61,8 @@ Here is an overview of the steps in this example:
6161

6262
{{< include "task-tutorial-prereqs.md" >}}
6363

64+
<!-- steps -->
65+
6466
<!--
6567
Be familiar with the basic,
6668
non-parallel, use of [Job](/docs/concepts/workloads/controllers/job/).
@@ -329,14 +331,19 @@ Events:
329331
33s 33s 1 {job-controller } Normal SuccessfulCreate Created pod: job-wq-2-lglf8
330332
```
331333

332-
运行以下命令查看日志:
334+
<!--
335+
You can wait for the Job to succeed, with a timeout:
336+
-->
337+
你可以等待 Job 成功,等待时长有超时限制:
333338

334339
```shell
335-
kubectl logs pods/job-wq-2-7r7b2
340+
# 状况名称的检查不区分大小写
341+
kubectl wait --for=condition=complete --timeout=300s job/job-wq-2
336342
```
337343

338-
日志类似于:
339-
344+
```shell
345+
kubectl logs pods/job-wq-2-7r7b2
346+
```
340347
```
341348
Worker with sessionID: bbd72d0a-9e5c-4dd6-abf6-416cc267991f
342349
Initial queue state: empty=False

0 commit comments

Comments
 (0)