prefect_gcp.workers.cloud_run_v2
Classes
CloudRunWorkerJobV2Configuration
The configuration for the Cloud Run worker V2.
The schema for this class is used to populate the job_body section of the
default base job template.
Methods:
job_name
- The name of the job.
prepare_for_flow_run
flow_run: The flow run to prepare the job configuration fordeployment: The deployment associated with the flow run used for preparation.flow: The flow associated with the flow run used for preparation.work_pool: The work pool associated with the flow run used for preparation.worker_name: The worker name associated with the flow run used for preparation.
project
- The GCP project associated with the credentials.
CloudRunWorkerV2Variables
Default variables for the v2 Cloud Run worker.
The schema for this class is used to populate the variables section of the
default base job template.
CloudRunWorkerV2Result
The result of a Cloud Run worker V2 job.
CloudRunWorkerV2
The Cloud Run worker V2.
Methods:
kill_infrastructure
infrastructure_pid: The job name.configuration: The job configuration used to connect to GCP.grace_seconds: Not used for Cloud Run V2 (GCP handles graceful shutdown).
InfrastructureNotFound: If the job doesn’t exist.
run
flow_run: The flow run to run.configuration: The configuration for the job.task_status: The task status to update.
- The result of the job.