toloka.client.actions.Restriction
| Source code
Restriction( self, *, scope: Union[UserRestriction.Scope, str, None] = None, duration_days: Optional[int] = None, private_comment: Optional[str] = None)
Restricts Toloker's access to projects or pools.
To have better control over restriction period use RestrictionV2.
Parameters | Type | Description |
---|---|---|
scope | Union[UserRestriction.Scope, str, None] |
|
duration_days | Optional[int] | A blocking period in days. If the |
private_comment | Optional[str] | A private comment. It is visible only to the requester. |
Examples:
new_pool = toloka.client.pool.Pool() # pool creation is simplifiednew_pool.quality_control.add_action( collector=toloka.client.collectors.AssignmentSubmitTime(history_size=5, fast_submit_threshold_seconds=20), conditions=[toloka.client.conditions.FastSubmittedCount > 1], action=toloka.client.actions.Restriction( scope='PROJECT', duration_days=10, ))
Last updated: August 28, 2023