Skip to main content

v8_worker_task_handler

Runs the v8 federated worker tasks a pod receives as JOB_REQUESTs.

JobRequestDispatcher hands over each JOB_REQUEST that is not an interactive-DAG trigger; the task is authorised, checked against the target datasource and run on a _Worker.

Classes​

V8WorkerTaskHandler​

class V8WorkerTaskHandler(    ctx: PodContext,    *,    reader: TaskRequestReader,    mailbox: Callable[[], _PodMailbox | None],    access_manager: BitfountAM,    pod_vitals: _PodVitals,    pod_dp: DPPodConfig | None,    approved_pods: list[str],    project_db_connector: ProjectDbConnector | None,    hook_owner: Pod,):

Handles v8 federated worker tasks for a pod.

Arguments

  • ctx: The pod's identity and services.
  • reader: Reads the task requests.
  • mailbox: Returns the pod's mailbox, which is set once the pod has started.
  • access_manager: Authorises the modeller's access to the datasource.
  • pod_vitals: The pod's vitals, handed to each worker.
  • pod_dp: The pod's differential privacy configuration, if any.
  • approved_pods: The pods this pod will share a secure-aggregation task with.
  • project_db_connector: Where task results are stored, if anywhere.
  • hook_owner: The pod passed to the task-start, task-error and task-end hooks.

Methods​


run​

async def run(self, message: _BitfountMessage) ‑> None:

Run the v8 federated task a JOB_REQUEST carries.