This document describes Celery 2.4. For development docs, go here.
celery.concurrency.base¶
-
class
celery.concurrency.base.
BasePool
(limit=None, putlocks=True, logger=None, **options)¶ -
CLOSE
= 2¶
-
RUN
= 1¶
-
TERMINATE
= 3¶
-
class
Timer
(schedule=None, on_error=None, on_tick=None, **kwargs)¶ -
-
class
BasePool.Timer.
Schedule
(max_interval=2, on_error=None)¶ ETA scheduler.
-
clear
()¶
-
empty
()¶ Is the schedule empty?
-
enter
(entry, eta=None, priority=0)¶ Enter function into the scheduler.
Parameters: - entry – Item to enter.
- eta – Scheduled time as a
datetime.datetime
object. - priority – Unused.
-
handle_error
(exc_info)¶
-
info
()¶
-
on_error
= None¶
-
queue
¶
-
-
BasePool.Timer.
apply_after
(msecs, fun, args=(), kwargs={}, priority=0)¶
-
BasePool.Timer.
apply_at
(eta, fun, args=(), kwargs={}, priority=0)¶
-
BasePool.Timer.
apply_entry
(entry)¶
-
BasePool.Timer.
apply_interval
(msecs, fun, args=(), kwargs={}, priority=0)¶
-
BasePool.Timer.
cancel
(tref)¶
-
BasePool.Timer.
clear
()¶
-
BasePool.Timer.
empty
()¶
-
BasePool.Timer.
ensure_started
()¶
-
BasePool.Timer.
enter
(entry, eta, priority=None)¶
-
BasePool.Timer.
enter_after
(msecs, entry, priority=0)¶
-
BasePool.Timer.
exit_after
(msecs, priority=10)¶
-
BasePool.Timer.
next
()¶
-
BasePool.Timer.
on_tick
= None¶
-
BasePool.Timer.
queue
¶
-
BasePool.Timer.
run
()¶
-
BasePool.Timer.
running
= False¶
-
BasePool.Timer.
stop
()¶
-
class
-
BasePool.
active
¶
-
BasePool.
apply_async
(target, args=None, kwargs=None, callback=None, errback=None, accept_callback=None, timeout_callback=None, soft_timeout=None, timeout=None, **compat)¶ Equivalent of the
apply()
built-in function.Callbacks should optimally return as soon as possible ince otherwise the thread which handles the result will get blocked.
-
BasePool.
info
¶
-
BasePool.
is_green
= False¶
-
BasePool.
num_processes
¶
-
BasePool.
on_apply
(*args, **kwargs)¶
-
BasePool.
on_ready
(callback, errback, ret_value)¶ What to do when a worker task is ready and its return value has been collected.
-
BasePool.
on_start
()¶
-
BasePool.
on_stop
()¶
-
BasePool.
on_terminate
()¶
-
BasePool.
on_worker_error
(errback, exc_info)¶
-
BasePool.
rlimit_safe
= True¶
-
BasePool.
safe_apply_callback
(fun, *args)¶
-
BasePool.
signal_safe
= True¶
-
BasePool.
start
()¶
-
BasePool.
stop
()¶
-
BasePool.
terminate
()¶
-
BasePool.
terminate_job
(pid)¶
-
-
celery.concurrency.base.
apply_target
(target, args=(), kwargs={}, callback=None, accept_callback=None, pid=None)¶