Skip to content

Commit b310a33

Browse files
authored
add more resources for ULTRA jobs (#966)
1 parent b72d00d commit b310a33

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

sds_data_manager/constructs/processing_construct.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ def add_job(self, job_name: str, data_access_url: str = ""):
108108
empty_on_delete=True,
109109
removal_policy=cdk.RemovalPolicy.DESTROY,
110110
)
111+
# Ultra jobs need more resources than others. Specifically, ULTRA l1a
112+
# TODO : optimize ULTRA l1a to use less resources
113+
cpu = 4
114+
memory = cdk.Size.gibibytes(16)
115+
if "ultra" in job_name:
116+
cpu = 8
117+
memory = cdk.Size.gibibytes(48)
111118
# Create the job definition
112119
container_definition = batch.EcsFargateContainerDefinition(
113120
self,
@@ -116,8 +123,8 @@ def add_job(self, job_name: str, data_access_url: str = ""):
116123
image=ecs.ContainerImage.from_ecr_repository(
117124
repository=container_repo, tag="latest"
118125
),
119-
memory=cdk.Size.gibibytes(16),
120-
cpu=4,
126+
memory=memory,
127+
cpu=cpu,
121128
environment={
122129
# Useful for switching APIs between dev / prod endpoints
123130
"IMAP_DATA_ACCESS_URL": data_access_url,

0 commit comments

Comments
 (0)