MCPcopy
hub / github.com/celery/celery / autoscale

Function autoscale

celery/worker/control.py:578–584  ·  view source on GitHub ↗

Modify autoscale settings.

(state, max=None, min=None)

Source from the content-addressed store, hash-verified

576 signature='[max [min]]',
577)
578def autoscale(state, max=None, min=None):
579 """Modify autoscale settings."""
580 autoscaler = state.consumer.controller.autoscaler
581 if autoscaler:
582 max_, min_ = autoscaler.update(max, min)
583 return ok(f'autoscale now max={max_} min={min_}')
584 raise ValueError('Autoscale not enabled')
585
586
587@control_command()

Callers

nothing calls this directly

Calls 2

okFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected