This document describes an older version of Celery (2.5).
For the latest stable version please
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 Entry(fun, args=None, kwargs=None)
-
cancel()
-
cancelled = False
-
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()
-
BasePool.active
-
BasePool.apply_async(target, args=[], kwargs={}, **options)
Equivalent of the apply() built-in function.
Callbacks should optimally return as soon as possible since
otherwise the thread which handles the result will get blocked.
-
BasePool.info
-
BasePool.is_green = False
set to true if pool uses greenlets.
-
BasePool.num_processes
-
BasePool.on_apply(*args, **kwargs)
-
BasePool.on_start()
-
BasePool.on_stop()
-
BasePool.on_terminate()
-
BasePool.requires_mediator = False
set to true if pool requires the use of a mediator
thread (e.g. if applying new items can block the current thread).
-
BasePool.restart()
-
BasePool.rlimit_safe = True
set to true if pool supports rate limits.
(this is here for gevent, which currently does not implement
the necessary timers).
-
BasePool.signal_safe = True
set to true if the pool can be shutdown from within
a signal handler.
-
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, **_)