toloka.client.TolokaClient.wait_operation
| Source code
wait_operation( self, op: Operation, timeout: timedelta = ..., disable_progress: bool = False)
Waits for a Toloka operation to complete.
To get information about the operation, call the get_operation method.
Parameters | Type | Description |
---|---|---|
op | Operation | The ID of the operation. |
timeout | timedelta | The wait timeout. Default value: 10 minutes. |
disable_progress | bool |
Default value: |
Returns:
The completed operation.
Return type:
Examples:
The example starts aggregation and waits for it.
aggregation_operation = toloka_client.aggregate_solutions_by_pool( type=toloka.client.aggregation.AggregatedSolutionType.WEIGHTED_DYNAMIC_OVERLAP, pool_id='1086170', answer_weight_skill_id='11294', fields=[toloka.client.aggregation.PoolAggregatedSolutionRequest.Field(name='result')] )aggregation_operation = toloka_client.wait_operation(aggregation_operation)aggregation_results = list(toloka_client.get_aggregated_solutions(aggregation_operation.id))
Last updated: August 28, 2023