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

Commit

Permalink
changed task_cpu back to cpu for backwards compat
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanluciano committed Apr 8, 2024
1 parent 4f12864 commit e0335aa
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions prefect_aws/workers/ecs_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
containerDefinitions:
- image: "{{ image }}"
name: "{{ container_name }}"
cpu: "{{ task_cpu }}"
cpu: "{{ cpu }}"
family: "{{ family }}"
memory: "{{ task_memory }}"
executionRoleArn: "{{ execution_role_arn }}"
Expand All @@ -121,8 +121,8 @@
environment: "{{ env }}"
cpu: "{{ container_cpu }}"
memory: "{{ container_memory }}"
cpu: "{{ task_cpu }}"
memory: "{{ task_memory }}"
cpu: "{{ cpu }}"
memory: "{{ memory }}"
taskRoleArn: "{{ task_role_arn }}"
tags: "{{ labels }}"
taskDefinition: "{{ task_definition_arn }}"
Expand Down Expand Up @@ -434,7 +434,7 @@ class ECSVariables(BaseVariables):
"defaults to a Prefect base image matching your local versions."
),
)
task_cpu: int = Field(
cpu: int = Field(
title="CPU",
default=None,
description=(
Expand All @@ -443,7 +443,7 @@ class ECSVariables(BaseVariables):
f"{ECS_DEFAULT_CPU} will be used unless present on the task definition."
),
)
task_memory: int = Field(
memory: int = Field(
default=None,
description=(
"The amount of memory to provide to the ECS task. Valid amounts are "
Expand Down Expand Up @@ -1336,7 +1336,6 @@ def _prepare_task_definition(
launch_type = configuration.task_run_request.get(
"launchType", ECS_DEFAULT_LAUNCH_TYPE
)
print(task_definition)

if launch_type == "FARGATE" or launch_type == "FARGATE_SPOT":
# Task level memory and cpu are required when using fargate
Expand Down

0 comments on commit e0335aa

Please sign in to comment.