RejectAllAssignments

toloka.client.actions.RejectAllAssignments | Source code

RejectAllAssignments(self, *, public_comment: Optional[str] = None)

Rejects all Toloker's assignments in the pool. This action is available for pools with non-automatic acceptance.

Parameters description

ParametersTypeDescription
public_commentOptional[str]

The reason of the rejection. It is visible both to the requester and to the Toloker.

Examples:

Reject all assignments if a Toloker sends responses too fast. Note, that the pool must be configured with non-automatic response acceptance.

new_pool = toloka.client.pool.Pool()
new_pool.quality_control.add_action(
collector=toloka.client.collectors.AssignmentSubmitTime(history_size=5, fast_submit_threshold_seconds=20),
conditions=[toloka.client.conditions.FastSubmittedCount > 3],
action=toloka.client.actions.RejectAllAssignments(public_comment='Too fast responses.')
)

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