Accepts and rejects tasks on the backend.
Accepts and rejects tasks on the backend. Returns all tasks.
All tasks.
The ValidationStrategy.
A reference to the backend AutomanAdapter.
The tasks passed in, with new states.
Returns true if all of the tasks from the before list are set to the given state in the after list.
Returns true if all of the tasks from the before list are set to the given state in the after list.
A list of tasks.
A list of tasks.
The state to check.
True if the invariant holds.
Post new tasks if needed.
Post new tasks if needed. Returns only newly-created tasks.
The complete list of tasks.
Question data.
True if any tasks suffered a timeout on the last iteration.
A list of newly-created tasks.
Given a list of RUNNING tasks and a list of tasks returned from the AutomanAdapter.
Given a list of RUNNING tasks and a list of tasks returned from the AutomanAdapter.retrieve method, ensure that a number of invariants hold.
A list of RUNNING tasks.
A list of tasks returned by the AutomanAdapter.retrieve method.
True if all invariants hold.
Crowdsources a task on the desired backend, scheduling and rescheduling enough jobs until the chosen quality-control mechanism is confident in the result, and paying for answers where appropriate.
The list of newly-spawned tasks should never be zero.
The list of newly-spawned tasks should never be zero.
A list of newly-spawned tasks.
True if the invariant holds.
Calculates the total cost of all tasks that might potentially be accepted.
Calculates the total cost of all tasks that might potentially be accepted.
The complete list of tasks.
The amount spent.
Controls scheduling of tasks for a given question.
Note on virtual ticks: 1. The user supplies mock answers, each with a delay_in_s parameter. 2. When the scheduler starts up, if a question comes with mock answers, the scheduler knows that it should use virtual ticks. 3. For each "tick group" (the set of answers with the same delay_in_s), the scheduler advances exactly one loop iteration. 4. When the scheduler calls backend operations, it forwards the current time, virtual or otherwise. The backend should only return answered thunks when the current time is after the time of the response.