Celery v0.8.1 (stable) documentation
Process Pools.
Version of multiprocessing.Pool that can dynamically grow in size.
Add workers to the pool.
Parameter: | size – Number of workers to add (default: 1) |
---|
Replace dead workers in the pool by spawning new ones.
Returns: | number of dead processes replaced, or None if all processes are alive and running. |
---|
Process Pool for processing tasks in parallel.
Parameters: |
---|
Equivalent of the :func:apply built-in function.
All callbacks and errbacks should complete immediately since otherwise the thread which handles the result will get blocked.
Run the task pool.
Will pre-fork all workers so they’re ready to accept tasks.
Check if a process is not running by PID.
Rtype bool: |
---|
Check if process is not running anymore.
First it finds out if the process is running by sending signal 0. Then if the process is a child process, and is running it finds out if it’s a zombie process and reaps it. If the process is running and is not a zombie it tries to send a ping through the process pipe.
Parameter: | process – A multiprocessing.Process instance. |
---|---|
Returns: | True if the process is not running, False otherwise. |
Reap process if the process is a zombie.
Returns: | True if process was reaped or is not running, False otherwise. |
---|