toloka.client.TolokaClient.close_training_async
| Source code
close_training_async(self, training_id: str)
Closes a training. Sends an asynchronous request to Toloka.
Tasks from closed trainings are not assigned to Tolokers.
Parameters | Type | Description |
---|---|---|
training_id | str | The ID of the training to be closed. |
Returns:
An object to track the progress of the operation. If the training is already closed then None
is returned.
Return type:
Optional[TrainingCloseOperation]
Examples:
opened_training = next(toloka_client.get_trainings(status='OPEN'))close_op = toloka_client.close_training_async(training_id=opened_training.id)toloka_client.wait_operation(close_op)
Last updated: August 28, 2023