Merge pull request #45568 from walidghallab/jobs
Fix documentation for parallel processing work queue tasks.pull/45622/head
commit
8cefbcdc01
|
@ -84,7 +84,7 @@ Next install the `amqp-tools` so you can work with message queues.
|
|||
The next commands show what you need to run inside the interactive shell in that Pod:
|
||||
|
||||
```shell
|
||||
apt-get update && apt-get install -y curl ca-certificates amqp-tools python dnsutils
|
||||
apt-get update && apt-get install -y curl ca-certificates amqp-tools python3 dnsutils
|
||||
```
|
||||
|
||||
Later, you will make a container image that includes these packages.
|
||||
|
|
|
@ -59,6 +59,12 @@ You could also download the following files directly:
|
|||
- [`rediswq.py`](/examples/application/job/redis/rediswq.py)
|
||||
- [`worker.py`](/examples/application/job/redis/worker.py)
|
||||
|
||||
To start a single instance of Redis, you need to create the redis pod and redis service:
|
||||
|
||||
```shell
|
||||
kubectl apply -f https://k8s.io/examples/application/job/redis/redis-pod.yaml
|
||||
kubectl apply -f https://k8s.io/examples/application/job/redis/redis-service.yaml
|
||||
```
|
||||
|
||||
## Filling the queue with tasks
|
||||
|
||||
|
@ -171,7 +177,7 @@ Since the workers themselves detect when the workqueue is empty, and the Job con
|
|||
know about the workqueue, it relies on the workers to signal when they are done working.
|
||||
The workers signal that the queue is empty by exiting with success. So, as soon as **any** worker
|
||||
exits with success, the controller knows the work is done, and that the Pods will exit soon.
|
||||
So, you need to set the completion count of the Job to 1. The job controller will wait for
|
||||
So, you need to leave the completion count of the Job unset. The job controller will wait for
|
||||
the other pods to complete too.
|
||||
|
||||
## Running the Job
|
||||
|
|
Loading…
Reference in New Issue