@@ -31,10 +31,10 @@ Here is an overview of the steps in this example:
3131
3232<!--
33331. **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
40401 . ** 启动存储服务用于保存工作队列。** 在这个例子中,我们使用 Redis 来存储工作项。
@@ -52,7 +52,7 @@ Here is an overview of the steps in this example:
5252
5353<!--
54541. **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-->
57573 . ** 启动一个 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<!--
6567Be familiar with the basic,
6668non-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```
341348Worker with sessionID: bbd72d0a-9e5c-4dd6-abf6-416cc267991f
342349Initial queue state: empty=False
0 commit comments