mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-07 02:28:11 +08:00
Updated README
This commit is contained in:
@@ -27,15 +27,14 @@ This can be increased or decreased at will by settings `Q_SAVE_LIMIT = n`. With
|
|||||||
Set `Q_SAVE_LIMIT = 0` to save all results to the database.
|
Set `Q_SAVE_LIMIT = 0` to save all results to the database.
|
||||||
Failed packages are always saved.
|
Failed packages are always saved.
|
||||||
|
|
||||||
### Medic
|
### Sentinel
|
||||||
|
|
||||||
The medic loop checks the health of all workers, including the pusher and the monitor.
|
The sentinel spawns all process and then checks the health of all workers, including the pusher and the monitor. Reincarnating processes if any may fail.
|
||||||
In case one of them dies, the medic will reincarnate a new process to take over the duties of the deceased.
|
In case of a stop signal, the sentinel will halt the pusher and instruct the workers and monitor to finish the remaining items , before exiting.
|
||||||
|
|
||||||
### Hooks
|
### Hooks
|
||||||
|
|
||||||
When you pass `hook='module.somefunction'` to the package, upon completion of the package this function will be called with the Task object as the first argument.
|
Packages can be assigned a hook function, upon completion of the package this function will be called with the Task object as the first argument.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Todo
|
### Todo
|
||||||
|
|||||||
+12
-4
@@ -50,12 +50,20 @@ database. This can be increased or decreased at will by settings
|
|||||||
``Q_SAVE_LIMIT = 0`` to save all results to the database. Failed
|
``Q_SAVE_LIMIT = 0`` to save all results to the database. Failed
|
||||||
packages are always saved.
|
packages are always saved.
|
||||||
|
|
||||||
Medic
|
Sentinel
|
||||||
|
~~~~~~~~
|
||||||
|
|
||||||
|
The sentinel spawns all process and then checks the health of all
|
||||||
|
workers, including the pusher and the monitor. Reincarnating processes
|
||||||
|
if any may fail. In case of a stop signal, the sentinel will halt the
|
||||||
|
pusher and instruct the workers and monitor to finish the remaining
|
||||||
|
items , before exiting.
|
||||||
|
|
||||||
|
Hooks
|
||||||
~~~~~
|
~~~~~
|
||||||
|
|
||||||
The medic loop checks the health of all workers, including the pusher
|
Packages can be assigned a hook function, upon completion of the package
|
||||||
and the monitor. In case one of them dies, the medic will reincarnate a
|
this function will be called with the Task object as the first argument.
|
||||||
new process to take over the duties of the deceased.
|
|
||||||
|
|
||||||
Todo
|
Todo
|
||||||
~~~~
|
~~~~
|
||||||
|
|||||||
Reference in New Issue
Block a user