Skip to content

Commit e6e13ee

Browse files
committed
some modifications in workers doc
1 parent 40990dd commit e6e13ee

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

docs/jobs.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# Jobs & Tasks
22

3-
A **Job** is an unit of work that can be added to a Queue. It will be later dequeued by a Worker.
3+
A **Task** is a Python class wrapping a unit of processing. A task may invoke other tasks, synchronously or asynchronously (by queuing them as proper jobs).
44

5-
A **Task** is a Python class wrapping your asynchronous code.
6-
7-
Jobs have a main Task, that will be called when the Job starts. In this Job context, the main Task can then call sub-Tasks or any other Python code.
5+
A **Job** is an instance of the execution of a Task. It must link to a specific Task via it's path and it must have parameters. It must be queued in a Queue. A Worker then dequeues and executes it. The worker updates it with metadata about it's execution : status, traceback ...
86

97
## Job statuses
108

docs/workers.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
## Worker
12

2-
## Worker statuses
3+
A worker is a unit of processing, that dequeues jobs and executes them.
34

4-
A Worker is always in one of these statuses:
5+
It is started with a list of queues to listen to, in a specific order.
6+
7+
It can be started with concurrency options (multiple processes and / or multiple greenlets). We call this whole group a single 'worker' even though it is able to dequeue multiple jobs in parallel.
8+
9+
10+
## Statuses
11+
12+
At any time, a worker is in one of these statuses:
513

614
* `init`: General worker initialization
715
* `wait`: Waiting for new jobs from Redis

0 commit comments

Comments
 (0)