File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 221221 },
222222 "path" : " ./src/parallel/parallel.py"
223223 },
224+ {
225+ "name" : " Parallel Operations" ,
226+ "description" : " Executing multiple durable operations in parallel" ,
227+ "handler" : " parallel.handler" ,
228+ "integration" : true ,
229+ "durableConfig" : {
230+ "RetentionPeriodInDays" : 7 ,
231+ "ExecutionTimeout" : 300
232+ },
233+ "path" : " ./src/parallel/parallel.py"
234+ },
224235 {
225236 "name" : " Map Operations" ,
226237 "description" : " Processing collections using map-like durable operations" ,
232243 },
233244 "path" : " ./src/map/map_operations.py"
234245 },
246+ {
247+ "name" : " Map Operations Flat" ,
248+ "description" : " Processing collections using map-like durable operations in FLAT mode" ,
249+ "handler" : " map_operations_flat.handler" ,
250+ "integration" : true ,
251+ "durableConfig" : {
252+ "RetentionPeriodInDays" : 7 ,
253+ "ExecutionTimeout" : 300
254+ },
255+ "path" : " ./src/map/map_operations_flat.py"
256+ },
235257 {
236258 "name" : " Map Large Scale" ,
237259 "description" : " Processing collections using map-like durable operations in large scale" ,
Original file line number Diff line number Diff line change 420420 }
421421 }
422422 },
423+ " MapOperationsFlat " : {
424+ " Type " : " AWS::Serverless::Function" ,
425+ " Properties " : {
426+ " CodeUri " : " build/" ,
427+ " Handler " : " map_operations_flat.handler" ,
428+ " Description " : " Processing collections using map-like durable operations in FLAT mode" ,
429+ " Role " : {
430+ " Fn::GetAtt " : [
431+ " DurableFunctionRole" ,
432+ " Arn"
433+ ]
434+ },
435+ " DurableConfig " : {
436+ " RetentionPeriodInDays " : 7,
437+ " ExecutionTimeout " : 300
438+ }
439+ }
440+ },
423441 " MapWithLargeScale " : {
424442 " Type " : " AWS::Serverless::Function" ,
425443 " Properties " : {
Original file line number Diff line number Diff line change 1111@pytest .mark .example
1212@pytest .mark .durable_execution (
1313 handler = map_operations_flat .handler ,
14- lambda_function_name = "map operations " ,
14+ lambda_function_name = "Map Operations Flat " ,
1515)
1616def test_map_operations_flat (durable_runner ):
1717 """Test map_operations example using context.map()."""
Original file line number Diff line number Diff line change 22
33import pytest
44from aws_durable_execution_sdk_python .execution import InvocationStatus
5- from aws_durable_execution_sdk_python .lambda_service import OperationStatus
5+ from aws_durable_execution_sdk_python .lambda_service import OperationStatus , OperationType
66
77from src .parallel import parallel
88from test .conftest import deserialize_operation_payload
@@ -35,4 +35,5 @@ def test_parallel(durable_runner):
3535
3636 # Verify all children succeeded
3737 for child in parallel_op .child_operations :
38+ assert child .operation_type == OperationType .CONTEXT
3839 assert child .status is OperationStatus .SUCCEEDED
Original file line number Diff line number Diff line change 22
33import pytest
44from aws_durable_execution_sdk_python .execution import InvocationStatus
5- from aws_durable_execution_sdk_python .lambda_service import OperationStatus
5+ from aws_durable_execution_sdk_python .lambda_service import OperationStatus , OperationType
66
77from src .parallel import parallel_flat
88from test .conftest import deserialize_operation_payload
1111@pytest .mark .example
1212@pytest .mark .durable_execution (
1313 handler = parallel_flat .handler ,
14- lambda_function_name = "Parallel Operations" ,
14+ lambda_function_name = "Parallel Operations Flat " ,
1515)
1616def test_parallel_flat (durable_runner ):
1717 """Test parallel example using context.parallel()."""
@@ -35,4 +35,5 @@ def test_parallel_flat(durable_runner):
3535
3636 # Verify all children succeeded
3737 for child in parallel_op .child_operations :
38+ assert child .operation_type != OperationType .CONTEXT
3839 assert child .status is OperationStatus .SUCCEEDED
You can’t perform that action at this time.
0 commit comments