celery.concurrency.base

Base Execution Pool.

class celery.concurrency.base.BasePool(limit=None, putlocks=True, forking_enable=True, callbacks_propagate=(), app=None, **options)[исходный код]

Task pool.

CLOSE = 2
RUN = 1
TERMINATE = 3
class Timer(schedule=None, on_error=None, on_tick=None, on_start=None, max_interval=None, **kwargs)

Timer thread.

Примечание

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
Schedule

alias of Timer

call_after(*args, **kwargs)
call_at(*args, **kwargs)
call_repeatedly(*args, **kwargs)
cancel(tref)
clear()
empty()
ensure_started()
enter(entry, eta, priority=None)
enter_after(*args, **kwargs)
exit_after(secs, priority=10)
next()
on_tick = None
property queue
run()

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 = False
stop()
property active
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()[исходный код]
property info
is_green = False

set to true if pool uses greenlets.

maintain_pool(*args, **kwargs)[исходный код]
property num_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.

Back to Top