@@ -31,10 +31,10 @@ Here is an overview of the steps in this example:
31
31
32
32
<!--
33
33
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.
38
38
-->
39
39
40
40
1 . ** 启动存储服务用于保存工作队列。** 在这个例子中,我们使用 Redis 来存储工作项。
@@ -52,7 +52,7 @@ Here is an overview of the steps in this example:
52
52
53
53
<!--
54
54
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.
56
56
-->
57
57
3 . ** 启动一个 Job 对队列中的任务进行处理** 。这个 Job 启动了若干个 Pod。
58
58
每个 Pod 从消息队列中取出一个工作任务,处理它,然后重复,直到到达队列的尾部。
@@ -61,6 +61,8 @@ Here is an overview of the steps in this example:
61
61
62
62
{{< include "task-tutorial-prereqs.md" >}}
63
63
64
+ <!-- steps -->
65
+
64
66
<!--
65
67
Be familiar with the basic,
66
68
non-parallel, use of [Job](/docs/concepts/workloads/controllers/job/).
@@ -329,14 +331,19 @@ Events:
329
331
33s 33s 1 {job-controller } Normal SuccessfulCreate Created pod: job-wq-2-lglf8
330
332
```
331
333
332
- 运行以下命令查看日志:
334
+ <!--
335
+ You can wait for the Job to succeed, with a timeout:
336
+ -->
337
+ 你可以等待 Job 成功,等待时长有超时限制:
333
338
334
339
``` shell
335
- kubectl logs pods/job-wq-2-7r7b2
340
+ # 状况名称的检查不区分大小写
341
+ kubectl wait --for=condition=complete --timeout=300s job/job-wq-2
336
342
```
337
343
338
- 日志类似于:
339
-
344
+ ``` shell
345
+ kubectl logs pods/job-wq-2-7r7b2
346
+ ```
340
347
```
341
348
Worker with sessionID: bbd72d0a-9e5c-4dd6-abf6-416cc267991f
342
349
Initial queue state: empty=False
0 commit comments