celery.concurrency.base
celery.concurrency.base
TaskPool interface.
class celery.concurrency.base.BasePool(limit=None, putlocks=True, forking_enable=True, callbacks_propagate=(), \*options*)[源代码]
CLOSE = 2
RUN = 1
TERMINATE = 3
class Timer(schedule=None, on_error=None, on_tick=None, on_start=None, max_interval=None, \*kwargs*)
class Entry(fun, args=None, kwargs=None)
args None
cancel()
cancelled None
fun None
kwargs None
tref None
BasePool.Timer.Schedule
Timer 的别名
BasePool.Timer.call_after(\args, **kwargs*)
BasePool.Timer.call_at(\args, **kwargs*)
BasePool.Timer.call_repeatedly(\args, **kwargs*)
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(\args, **kwargs*)
BasePool.Timer.exit_after(secs, priority=10)
BasePool.Timer.next()
BasePool.Timer.on_tick = None
BasePool.Timer.queue None
BasePool.Timer.run()
BasePool.Timer.running = False
BasePool.Timer.stop()
BasePool.active None[源代码]
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.close()[源代码]
BasePool.did_start_ok()[源代码]
BasePool.flush()
BasePool.info None[源代码]
BasePool.is_green = False
set to true if pool uses greenlets.
BasePool.maintain_pool(\args, **kwargs*)[源代码]
BasePool.num_processes None[源代码]
BasePool.on_apply(\args, **kwargs*)[源代码]
BasePool.on_close()[源代码]
BasePool.on_hard_timeout(job)[源代码]
BasePool.on_soft_timeout(job)[源代码]
BasePool.on_start()[源代码]
BasePool.on_stop()[源代码]
BasePool.on_terminate()[源代码]
BasePool.register_with_event_loop(loop)
BasePool.restart()[源代码]
BasePool.signal_safe = True
set to true if the pool can be shutdown from within a signal handler.
BasePool.start()[源代码]
BasePool.stop()[源代码]
BasePool.task_join_will_block = True
BasePool.terminate()[源代码]
BasePool.terminate_job(pid)[源代码]
BasePool.uses_semaphore = False
only used by multiprocessing pool
celery.concurrency.base.apply_target(target, args=(), kwargs={}, callback=None, accept_callback=None, pid=None, getpid=<built-in function getpid>, propagate=(), monotonic=<function _monotonic at 0x93ee4c4>, \*_*)[源代码]