crowdflower.worker¶
-
class
crowdflower.worker.Worker(job, client=None, **data)¶ CrowdFlower Worker.
Parameters: - job (crowdflower.job.Job) –
Jobinstance owning thisWorker - client (crowdflower.client.Client) –
Clientinstance - data (dict) – Attributes
-
bonus(amount, reason=None)¶ Pay
Workera bonus ofamountcents. Optionally include a message stating thereasonof the bonus.Parameters: - amount (int) – Amount in cents
- reason (str) – Include a message with the bonus
-
flag(flag, persist=False)¶ Flags and prevents a
Workerfrom completing theJobwith the reasonflag. Existingjudgmentswill not be thrown away. Ifpersistis se toTrue, then the Worker is flagged out from all Jobs.Parameters: - flag (str) – Flag reason
- persist (bool) – If True, flag in all Jobs (default False)
- job (crowdflower.job.Job) –