Download Celery Documentation

Transcript
Celery Documentation, Release 3.0.24
celery.concurrency.processes
Pool implementation using multiprocessing.
We use the billiard fork of multiprocessing which contains numerous improvements.
class celery.concurrency.processes.TaskPool(limit=None,
putlocks=True,
forking_enable=True,
callbacks_propagate=(),
**options)
Multiprocessing Pool implementation.
class Pool(processes=None, initializer=None, initargs=(), maxtasksperchild=None, timeout=None,
soft_timeout=None, lost_worker_timeout=10.0, max_restarts=None, max_restart_freq=1,
on_process_up=None,
on_process_down=None,
on_timeout_set=None,
on_timeout_cancel=None, threads=True, semaphore=None, putlocks=False, allow_restart=False)
Class which supports an async version of applying functions to arguments.
class Process(group=None, target=None, name=None, args=(), kwargs={}, daemon=None,
**_kw)
Process objects represent activity that is run in a separate process
The class is analagous to threading.Thread
authkey
daemon
exitcode
Return exit code of process or None if it has yet to stop
ident
Return identifier (PID) of process or None if it has yet to start
is_alive()
Return whether process is alive
join(timeout=None)
Wait until child process terminates
name
pid
Return identifier (PID) of process or None if it has yet to start
run()
Method to be run in sub-process; can be overridden in sub-class
sentinel
Return a file descriptor (Unix) or handle (Windows) suitable for waiting for process termination.
start()
Start child process
terminate()
Terminate process; sends SIGTERM signal or uses TerminateProcess()
class TaskPool.Pool.ResultHandler(outqueue, get, cache, poll, join_exited_workers,
putlock, restart_state, check_timeouts)
body()
finish_at_shutdown(handle_timeouts=False)
2.14. Internals
339