MCPcopy
hub / github.com/celery/celery / scale_down

Method scale_down

celery/worker/autoscale.py:115–118  ·  view source on GitHub ↗
(self, n)

Source from the content-addressed store, hash-verified

113 return self._grow(n)
114
115 def scale_down(self, n):
116 if self._last_scale_up and (
117 monotonic() - self._last_scale_up > self.keepalive):
118 return self._shrink(n)
119
120 def _grow(self, n):
121 info('Scaling up %s processes.', n)

Callers 3

test_updateMethod · 0.95
_maybe_scaleMethod · 0.95

Calls 1

_shrinkMethod · 0.95

Tested by 2

test_updateMethod · 0.76