Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
update timeout parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-thomas-roc committed Mar 18, 2024
1 parent b88d619 commit f53fb84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions prefect_gcp/cloud_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class CloudRunJob(Infrastructure):
timeout: Optional[int] = Field(
default=600,
gt=0,
le=3600,
le=86400,
title="Job Timeout",
description=(
"The length of time that Prefect will wait for a Cloud Run Job to complete "
Expand Down Expand Up @@ -392,9 +392,9 @@ async def generate_work_pool_base_job_template(self) -> dict:
), "Failed to generate default base job template for Cloud Run worker."
for key, value in self.dict(exclude_unset=True, exclude_defaults=True).items():
if key == "command":
base_job_template["variables"]["properties"]["command"][
"default"
] = shlex.join(value)
base_job_template["variables"]["properties"]["command"]["default"] = (
shlex.join(value)
)
elif key in [
"type",
"block_type_slug",
Expand Down Expand Up @@ -681,9 +681,9 @@ def _jobs_body(self) -> dict:
}
# add vpc connector if specified
if self.vpc_connector_name:
annotations[
"run.googleapis.com/vpc-access-connector"
] = self.vpc_connector_name
annotations["run.googleapis.com/vpc-access-connector"] = (
self.vpc_connector_name
)

# env and command here
containers = [self._add_container_settings({"image": self.image})]
Expand Down
2 changes: 1 addition & 1 deletion prefect_gcp/workers/cloud_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ class CloudRunWorkerJobConfiguration(BaseJobConfiguration):
timeout: Optional[int] = Field(
default=600,
gt=0,
le=3600,
le=86400,
title="Job Timeout",
description=(
"The length of time that Prefect will wait for a Cloud Run Job to complete "
Expand Down

0 comments on commit f53fb84

Please sign in to comment.