This document describes the current stable version of Celery (5.5). For development docs, go here.
celery.concurrency.base
¶
Base Execution Pool.
- class celery.concurrency.base.BasePool(limit=None, putlocks=True, forking_enable=True, callbacks_propagate=(), app=None, **options)[source]¶
Task pool.
- CLOSE = 2¶
- RUN = 1¶
- TERMINATE = 3¶
- class Timer(schedule: Timer | None = None, on_error: Callable[[Exception], None] | None = None, on_tick: Callable[[float], None] | None = None, on_start: Callable[[Timer], None] | None = None, max_interval: float | None = None, **kwargs: Any)¶
Timer thread.
Note
This is only used for transports not supporting AsyncIO.
- class Entry(fun, args=None, kwargs=None)¶
Schedule Entry.
- args¶
- cancel()¶
- canceled¶
- property cancelled¶
- fun¶
- kwargs¶
- tref¶
- run() None ¶
Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
- property active¶
- apply_async(target, args=None, kwargs=None, **options)[source]¶
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.
- body_can_be_buffer = False¶
- property info¶
- is_green = False¶
set to true if pool uses greenlets.
- property num_processes¶
- signal_safe = True¶
set to true if the pool can be shutdown from within a signal handler.
- task_join_will_block = True¶
- uses_semaphore = False¶
only used by multiprocessing pool