Shrink pool by n processes/threads.
(state, n=1, **kwargs)
| 552 | signature='[N=1]', |
| 553 | ) |
| 554 | def pool_shrink(state, n=1, **kwargs): |
| 555 | """Shrink pool by n processes/threads.""" |
| 556 | if state.consumer.controller.autoscaler: |
| 557 | return nok("pool_shrink is not supported with autoscale. Adjust autoscale range instead.") |
| 558 | else: |
| 559 | state.consumer.pool.shrink(n) |
| 560 | state.consumer._update_prefetch_count(-n) |
| 561 | return ok('pool will shrink') |
| 562 | |
| 563 | |
| 564 | @control_command() |
nothing calls this directly
no test coverage detected