celery.concurrency.base
Base Execution Pool.
- classcelery.concurrency.base.BasePool(limit=None, putlocks=True, forking_enable=True, callbacks_propagate=(), app=None, **options)
-
Task pool.
- CLOSE=2
- RUN=1
- TERMINATE=3
- classTimer(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.
- classEntry(fun, args=None, kwargs=None)
-
Schedule Entry.
- args
- cancel()
- canceled
- propertycancelled
- fun
- kwargs
- tref
- Schedule
-
alias of
Timer
- call_after(*args:Any, **kwargs:Any) Entry
- call_at(*args:Any, **kwargs:Any) Entry
- call_repeatedly(*args:Any, **kwargs:Any) Entry
- cancel(tref:Entry) None
- clear() None
- empty() bool
- ensure_started() None
- enter(entry:Entry, eta:float, priority:int|None=None) Entry
- enter_after(*args:Any, **kwargs:Any) Entry
- exit_after(secs:float, priority:int=10) None
- next() float|None
- on_tick:Callable[[float],None]|None=None
- propertyqueue:list
- 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.
- running:bool=False
- stop() None
- propertyactive
- apply_async(target, args=None, kwargs=None, **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.
- body_can_be_buffer=False
- close()
- did_start_ok()
- flush()
- propertyinfo
- is_green=False
-
set to true if pool uses greenlets.
- maintain_pool(*args, **kwargs)
- propertynum_processes
- on_apply(*args, **kwargs)
- on_close()
- on_hard_timeout(job)
- on_soft_timeout(job)
- on_start()
- on_stop()
- on_terminate()
- register_with_event_loop(loop)
- restart()
- signal_safe=True
-
set to true if the pool can be shutdown from within a signal handler.
- start()
- stop()
- task_join_will_block=True
- terminate()
- terminate_job(pid, signal=None)
- uses_semaphore=False
-
only used by multiprocessing pool
- celery.concurrency.base.apply_target(target, args=(), kwargs=None, callback=None, accept_callback=None, pid=None, getpid=<built-in function getpid>, propagate=(), monotonic=<built-in function monotonic>, **_)
-
Apply function within pool context.
Copyright © 2017-2026 Asif Saif Uddin, core team & contributors. All rights reserved.
Celery is licensed under The BSD License (3 Clause, also known as the new BSD license). The license is an OSI approved Open Source license and is GPL-compatible.
https://docs.celeryq.dev/en/stable/internals/reference/celery.concurrency.base.html