Skip to content

Commit b811f45

Browse files
committed
removed crontab
1 parent 1f49d9f commit b811f45

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

packages/aws-library/src/aws_library/ec2/_models.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,6 @@ class EC2InstanceBootSpecific(BaseModel):
160160
description="a list of docker image/tags to pull on instance cold start",
161161
),
162162
] = DEFAULT_FACTORY
163-
pre_pull_images_cron_interval: Annotated[
164-
datetime.timedelta,
165-
Field(
166-
description="time interval between pulls of images (minimum is 1 minute) "
167-
"(default to seconds, or see https://pydantic-docs.helpmanual.io/usage/types/#datetime-types for string formating)",
168-
),
169-
] = datetime.timedelta(minutes=30)
170163
buffer_count: Annotated[
171164
NonNegativeInt,
172165
Field(description="number of buffer EC2s to keep (defaults to 0)"),
@@ -180,7 +173,9 @@ def validate_bash_calls(cls, v):
180173
temp_file.writelines(v)
181174
temp_file.flush()
182175
# NOTE: this will not capture runtime errors, but at least some syntax errors such as invalid quotes
183-
sh.bash("-n", temp_file.name) # pyright: ignore[reportCallIssue] # sh is untyped, but this call is safe for bash syntax checking
176+
sh.bash(
177+
"-n", temp_file.name
178+
) # pyright: ignore[reportCallIssue] # sh is untyped, but this call is safe for bash syntax checking
184179
except sh.ErrorReturnCode as exc:
185180
msg = f"Invalid bash call in custom_boot_scripts: {v}, Error: {exc.stderr}"
186181
raise ValueError(msg) from exc
@@ -231,7 +226,7 @@ def _update_json_schema_extra(schema: JsonDict) -> None:
231226
"simcore/services/dynamic/another-nice-one:2.4.5",
232227
"asd",
233228
],
234-
"pre_pull_images_cron_interval": "01:00:00",
229+
"pre_pull_images_cron_interval": "01:00:00", # retired but kept for tests
235230
},
236231
{
237232
# AMI + pre-pull + buffer count

services/autoscaling/tests/unit/test_utils_cluster_scaling.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# pylint: disable=unused-variable
55
# pylint: disable=too-many-arguments
66

7-
import datetime
87
import json
98
import re
109
from collections.abc import Callable
@@ -145,9 +144,6 @@ async def test_ec2_startup_script_just_ami(
145144
)
146145
)
147146
assert not instance_boot_specific.pre_pull_images
148-
assert instance_boot_specific.pre_pull_images_cron_interval == datetime.timedelta(
149-
minutes=30
150-
)
151147
startup_script = await ec2_startup_script(instance_boot_specific, app_settings)
152148
assert len(startup_script.split("&&")) == 1
153149
assert re.fullmatch(
@@ -216,7 +212,6 @@ async def test_ec2_startup_script_with_pre_pulling(
216212
)
217213
)
218214
assert instance_boot_specific.pre_pull_images
219-
assert instance_boot_specific.pre_pull_images_cron_interval
220215
startup_script = await ec2_startup_script(instance_boot_specific, app_settings)
221216
assert len(startup_script.split("&&")) == 7
222217
assert re.fullmatch(
@@ -238,7 +233,6 @@ async def test_ec2_startup_script_with_custom_scripts(
238233
)
239234
)
240235
assert not instance_boot_specific.pre_pull_images
241-
assert instance_boot_specific.pre_pull_images_cron_interval
242236
startup_script = await ec2_startup_script(instance_boot_specific, app_settings)
243237
assert len(startup_script.split("&&")) == 1 + len(
244238
ec2_instances_boot_ami_scripts
@@ -262,7 +256,6 @@ async def test_ec2_startup_script_with_pre_pulling_but_no_registry(
262256
)
263257
)
264258
assert instance_boot_specific.pre_pull_images
265-
assert instance_boot_specific.pre_pull_images_cron_interval
266259
startup_script = await ec2_startup_script(instance_boot_specific, app_settings)
267260
assert len(startup_script.split("&&")) == 1
268261
assert re.fullmatch(

0 commit comments

Comments
 (0)