Skip to main content

pool_shrink

Shrink pool by n processes/threads.

def pool_shrink(
state: object,
n: int = 1,
**kwargs: dict
) - > dict

Shrink pool by n processes/threads.

Parameters

NameTypeDescription
stateobjectThe current application state containing the consumer and controller instances.
nint = 1The number of worker processes or threads to remove from the execution pool.
**kwargsdictAdditional keyword arguments passed to the control command.

Returns

TypeDescription
dictA dictionary containing a status message indicating whether the shrink operation was initiated or if it failed due to autoscaling being enabled.