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.
The ID of the training to be closed.
An object to track the progress of the operation. If the training is already closed then
None is returned.
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)