This document describes the current stable version of Celery (3.1). For development docs,
go here.
celery.worker.autoscale
This module implements the internal thread responsible
for growing and shrinking the pool according to the
current autoscale settings.
The autoscale thread is only enabled if --autoscale
has been enabled on the command-line.
-
class celery.worker.autoscale.Autoscaler(pool, max_concurrency, min_concurrency=0, worker=None, keepalive=30.0, mutex=None)[source]
-
body()[source]
-
force_scale_down(n)[source]
-
force_scale_up(n)[source]
-
info()[source]
-
maybe_scale()[source]
-
processes[source]
-
qty[source]
-
scale_down(n)[source]
-
scale_up(n)[source]
-
update(max=None, min=None)[source]
-
class celery.worker.autoscale.WorkerComponent(w, **kwargs)[source]
-
conditional = True
-
create(w)[source]
-
label = 'Autoscaler'
-
name = u'celery.worker.autoscale.WorkerComponent'
-
register_with_event_loop(w, hub)[source]
-
requires = (step:celery.worker.components.Pool{(step:celery.worker.components.Queues{(step:celery.worker.components.Hub{(step:celery.worker.components.Timer{()},)},)},)},)