manager: Add unique workers batches and task report handling#101
manager: Add unique workers batches and task report handling#101MiggySmallz wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
|
I think this mostly works @MiggySmallz . I left a couple of comments / questions There is 1 major addition I'd like to add to this code, as this would be the right time to do that: Instead of having a boolean "uniqueWorker", we might as well implement the concept of "repetitions":
fit's a minor adjustment, but it does impact the data layout which means it's hard to add later. And it allows for a important feature Does that make sense? Otherwise nice MR. Thanks! |
|
@jeisses The latest commit changes the 0 = Can complete Unlimited tasks per batch Anything besides 0 or 1 will most likely be rarely used, but the infrastructure is there now anyway. Also, I added a |
Unique Workers & Report Flow
Overview
This PR adds a Unique Workers mode to CSV task steps and fixes how reported tasks are handled throughout the system.
Changes
Unique Workers
A new "Unique workers" toggle on the task step settings form. When enabled, each worker can only complete one task per import batch. Once they finish a task, they're locked out of the remaining tasks in that batch. Rejecting or reporting a task does not count; the worker stays eligible and will receive another task.
This ensures data quality for tasks where you want a different person answering each row.
Files:
core/protobufs/src/task/task.proto,core/protobufs/src/effect.ts,apps/task-poster/src/fetcher.ts,modules/manager/src/modules/createWorkerManager.ts,modules/manager/src/modules/createTaskManager.tsReport Flow Fix
Previously, when a worker clicked Report on a task (flagging it as broken or unsuitable), they were permanently locked out of the rest of that batch, the same as if they had completed a task. This was a bug.
Now:
Files:
modules/manager/src/stores/managerTaskStore.ts,modules/manager/src/modules/createTaskManager.ts,modules/manager/src/main.ts,apps/task-poster/src/fetcher.tsTask List Refresh Fix
Workers sometimes had to manually refresh the page to see a newly assigned task. This was a timing issue.. the app was only starting to listen for new tasks after the page finished loading, so tasks assigned during that window were missed.
The app now starts listening as soon as the connection to the manager is ready.
Files:
apps/worker-app/app/composables/useTasks.ts