close_pool_async

toloka.client.TolokaClient.close_pool_async | Source code

close_pool_async(self, pool_id: str)

Closes a pool. Sends an asynchronous request to Toloka.

If all tasks in a pool are completed, then the pool is closed automatically.

Parameters description

ParametersTypeDescription
pool_idstr

The ID of the pool to be closed.

  • Returns:

    An object to track the progress of the operation. If the pool is already closed then None is returned.

  • Return type:

    Optional[PoolCloseOperation]

Examples:

open_pool = next(toloka_client.get_pools(status='OPEN'))
close_op = toloka_client.close_pool_async(pool_id=open_pool.id)
toloka_client.wait_operation(close_op)

Last updated: August 28, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming