async-lambda-unstable 0.2.11__tar.gz → 0.2.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.
Files changed (27) hide show
  1. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/PKG-INFO +2 -1
  2. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/README.md +1 -0
  3. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda/__init__.py +1 -1
  4. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda/models/task.py +10 -0
  5. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda_unstable.egg-info/PKG-INFO +2 -1
  6. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda/build_config.py +0 -0
  7. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda/cli.py +0 -0
  8. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda/config.py +0 -0
  9. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda/controller.py +0 -0
  10. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda/env.py +0 -0
  11. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda/models/__init__.py +0 -0
  12. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda/models/events/__init__.py +0 -0
  13. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda/models/events/api_event.py +0 -0
  14. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda/models/events/base_event.py +0 -0
  15. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda/models/events/managed_sqs_event.py +0 -0
  16. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda/models/events/scheduled_event.py +0 -0
  17. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda/models/events/unmanaged_sqs_event.py +0 -0
  18. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda/models/mock/mock_context.py +0 -0
  19. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda/models/mock/mock_event.py +0 -0
  20. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda/py.typed +0 -0
  21. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda_unstable.egg-info/SOURCES.txt +0 -0
  22. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda_unstable.egg-info/dependency_links.txt +0 -0
  23. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda_unstable.egg-info/entry_points.txt +0 -0
  24. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda_unstable.egg-info/requires.txt +0 -0
  25. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/async_lambda_unstable.egg-info/top_level.txt +0 -0
  26. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/pyproject.toml +0 -0
  27. {async-lambda-unstable-0.2.11 → async-lambda-unstable-0.2.12}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: async-lambda-unstable
3
- Version: 0.2.11
3
+ Version: 0.2.12
4
4
  Summary: A framework for creating AWS Lambda Async Workflows. - Unstable Branch
5
5
  Author-email: "Nuclei, Inc" <engineering@nuclei.ai>
6
6
  Description-Content-Type: text/markdown
@@ -46,6 +46,7 @@ All task decorators share common arguments for configuring the underlying lambda
46
46
  - `memory: int = 128` Sets the memory allocation for the function.
47
47
  - `timeout: int = 60` Sets the timeout for the function (max 900 seconds).
48
48
  - `ephemeral_storage: int = 512` Sets the ephemeral storage allocation for the function.
49
+ - `maximum_concurrency: Optional[int] = None` Sets the maximum concurrency value for the SQS trigger for the function. (only applies to `async_task` and `sqs_task` tasks.)
49
50
 
50
51
  ## Async Task
51
52
 
@@ -39,6 +39,7 @@ All task decorators share common arguments for configuring the underlying lambda
39
39
  - `memory: int = 128` Sets the memory allocation for the function.
40
40
  - `timeout: int = 60` Sets the timeout for the function (max 900 seconds).
41
41
  - `ephemeral_storage: int = 512` Sets the ephemeral storage allocation for the function.
42
+ - `maximum_concurrency: Optional[int] = None` Sets the maximum concurrency value for the SQS trigger for the function. (only applies to `async_task` and `sqs_task` tasks.)
42
43
 
43
44
  ## Async Task
44
45
 
@@ -9,4 +9,4 @@ from .models.events.managed_sqs_event import ManagedSQSEvent as ManagedSQSEvent
9
9
  from .models.events.scheduled_event import ScheduledEvent as ScheduledEvent
10
10
  from .models.events.unmanaged_sqs_event import UnmanagedSQSEvent as UnmanagedSQSEvent
11
11
 
12
- __version__ = "0.2.11"
12
+ __version__ = "0.2.12"
@@ -31,6 +31,7 @@ class AsyncLambdaTask(Generic[EventType]):
31
31
  timeout: int
32
32
  memory: int
33
33
  ephemeral_storage: int
34
+ maximum_concurrency: Optional[int]
34
35
 
35
36
  executable: Callable[[EventType], Any]
36
37
 
@@ -43,6 +44,7 @@ class AsyncLambdaTask(Generic[EventType]):
43
44
  timeout: int = 60,
44
45
  memory: int = 128,
45
46
  ephemeral_storage: int = 512,
47
+ maximum_concurrency: Optional[int] = None,
46
48
  ):
47
49
  AsyncLambdaTask.validate_task_id(task_id)
48
50
  self.executable = executable
@@ -52,6 +54,7 @@ class AsyncLambdaTask(Generic[EventType]):
52
54
  self.timeout = timeout
53
55
  self.memory = memory
54
56
  self.ephemeral_storage = ephemeral_storage
57
+ self.maximum_concurrency = maximum_concurrency
55
58
 
56
59
  @staticmethod
57
60
  def validate_task_id(task_id: str):
@@ -93,6 +96,11 @@ class AsyncLambdaTask(Generic[EventType]):
93
96
  return f"{self.get_function_logical_id()}Extra{index}"
94
97
 
95
98
  def get_template_events(self):
99
+ sqs_properties = {}
100
+ if self.maximum_concurrency is not None:
101
+ sqs_properties["ScalingConfig"] = {
102
+ "MaximumConcurrency": self.maximum_concurrency
103
+ }
96
104
  if self.trigger_type == TaskTriggerType.MANAGED_SQS:
97
105
  return {
98
106
  "ManagedSQS": {
@@ -106,6 +114,7 @@ class AsyncLambdaTask(Generic[EventType]):
106
114
  "Arn",
107
115
  ]
108
116
  },
117
+ **sqs_properties,
109
118
  },
110
119
  }
111
120
  }
@@ -117,6 +126,7 @@ class AsyncLambdaTask(Generic[EventType]):
117
126
  "BatchSize": 1,
118
127
  "Enabled": True,
119
128
  "Queue": self.trigger_config["queue_arn"],
129
+ **sqs_properties,
120
130
  },
121
131
  }
122
132
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: async-lambda-unstable
3
- Version: 0.2.11
3
+ Version: 0.2.12
4
4
  Summary: A framework for creating AWS Lambda Async Workflows. - Unstable Branch
5
5
  Author-email: "Nuclei, Inc" <engineering@nuclei.ai>
6
6
  Description-Content-Type: text/markdown
@@ -46,6 +46,7 @@ All task decorators share common arguments for configuring the underlying lambda
46
46
  - `memory: int = 128` Sets the memory allocation for the function.
47
47
  - `timeout: int = 60` Sets the timeout for the function (max 900 seconds).
48
48
  - `ephemeral_storage: int = 512` Sets the ephemeral storage allocation for the function.
49
+ - `maximum_concurrency: Optional[int] = None` Sets the maximum concurrency value for the SQS trigger for the function. (only applies to `async_task` and `sqs_task` tasks.)
49
50
 
50
51
  ## Async Task
51
52