async-lambda-unstable 0.6.10__tar.gz → 0.6.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/PKG-INFO +1 -1
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/__init__.py +1 -1
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/config.py +3 -3
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/controller.py +13 -1
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/.gitignore +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/README.md +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/build_config.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/cli.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/client.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/defer.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/env.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/middleware.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/__init__.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/api_response.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/case_insensitive_dict.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/events/__init__.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/events/api_event.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/events/base_event.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/events/dynamodb_event.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/events/managed_sqs_batch_event.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/events/managed_sqs_event.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/events/scheduled_event.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/events/unmanaged_sqs_event.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/mock/mock_context.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/mock/mock_event.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/task.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/payload_encoder.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/py.typed +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/util.py +0 -0
- {async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/pyproject.toml +0 -0
|
@@ -21,4 +21,4 @@ from .models.events.managed_sqs_event import ManagedSQSEvent as ManagedSQSEvent
|
|
|
21
21
|
from .models.events.scheduled_event import ScheduledEvent as ScheduledEvent
|
|
22
22
|
from .models.events.unmanaged_sqs_event import UnmanagedSQSEvent as UnmanagedSQSEvent
|
|
23
23
|
|
|
24
|
-
__version__ = "0.6.
|
|
24
|
+
__version__ = "0.6.12"
|
|
@@ -15,7 +15,7 @@ class AsyncLambdaConfig:
|
|
|
15
15
|
|
|
16
16
|
name: str = "async-lambda"
|
|
17
17
|
runtime: str = "python3.10"
|
|
18
|
-
s3_payload_retention: Optional[int] =
|
|
18
|
+
s3_payload_retention: Optional[int] = 180
|
|
19
19
|
default_task_memory: int = 128
|
|
20
20
|
default_task_ephemeral_storage: int = 512
|
|
21
21
|
|
|
@@ -43,12 +43,12 @@ def config_set_runtime(runtime: str):
|
|
|
43
43
|
config.runtime = runtime
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
def config_set_s3_payload_retention(days: int =
|
|
46
|
+
def config_set_s3_payload_retention(days: int = 180):
|
|
47
47
|
"""
|
|
48
48
|
Set the S3 payload retention policy in days.
|
|
49
49
|
|
|
50
50
|
Args:
|
|
51
|
-
days (int, optional): Number of days to retain payloads in S3. Defaults to
|
|
51
|
+
days (int, optional): Number of days to retain payloads in S3. Defaults to 180.
|
|
52
52
|
"""
|
|
53
53
|
config.s3_payload_retention = days
|
|
54
54
|
|
|
@@ -1042,12 +1042,24 @@ class AsyncLambdaController:
|
|
|
1042
1042
|
delay (int): Delay in seconds before delivering the message.
|
|
1043
1043
|
message_group_id (Optional[str]): MessageGroupId for FIFO queues. Defaults to None.
|
|
1044
1044
|
"""
|
|
1045
|
-
|
|
1045
|
+
if delay <= _SQS_MAX_DELAY_SECONDS:
|
|
1046
|
+
raise ValueError(
|
|
1047
|
+
f"Delays with EventBridge Scheduler must be greater than {_SQS_MAX_DELAY_SECONDS} seconds. Use SQS delay instead."
|
|
1048
|
+
)
|
|
1049
|
+
|
|
1050
|
+
# Schedule names are unique and ActionAfterCompletion="DELETE" is an asynchronous action. This can take a few
|
|
1051
|
+
# seconds, during which time, re-scheduling yourself on the same schedule_name would fail. Utilizing full
|
|
1052
|
+
# _SQS_MAX_DELAY_SECONDS as a buffer in case AWS ActionAfterCompletion becomes delayed.
|
|
1053
|
+
scheduler_delay = delay - _SQS_MAX_DELAY_SECONDS
|
|
1054
|
+
schedule_time = datetime.now(tz=timezone.utc) + timedelta(
|
|
1055
|
+
seconds=scheduler_delay
|
|
1056
|
+
)
|
|
1046
1057
|
schedule_expression = f"at({schedule_time.strftime('%Y-%m-%dT%H:%M:%S')})"
|
|
1047
1058
|
|
|
1048
1059
|
sqs_input: dict = {
|
|
1049
1060
|
"QueueUrl": queue_url,
|
|
1050
1061
|
"MessageBody": message_body,
|
|
1062
|
+
"DelaySeconds": _SQS_MAX_DELAY_SECONDS,
|
|
1051
1063
|
}
|
|
1052
1064
|
if message_group_id:
|
|
1053
1065
|
sqs_input["MessageGroupId"] = message_group_id
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/__init__.py
RENAMED
|
File without changes
|
{async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/api_response.py
RENAMED
|
File without changes
|
|
File without changes
|
{async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/events/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/models/mock/mock_event.py
RENAMED
|
File without changes
|
|
File without changes
|
{async_lambda_unstable-0.6.10 → async_lambda_unstable-0.6.12}/async_lambda/payload_encoder.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|