async-lambda-unstable 0.2.8__tar.gz → 0.2.9__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.2.8 → async-lambda-unstable-0.2.9}/PKG-INFO +1 -1
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/__init__.py +1 -1
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/controller.py +8 -5
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/models/events/managed_sqs_event.py +3 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/models/events/unmanaged_sqs_event.py +3 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda_unstable.egg-info/PKG-INFO +1 -1
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/README.md +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/build_config.py +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/cli.py +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/config.py +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/env.py +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/models/__init__.py +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/models/events/__init__.py +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/models/events/api_event.py +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/models/events/base_event.py +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/models/events/scheduled_event.py +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/models/mock/mock_context.py +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/models/mock/mock_event.py +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/models/task.py +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/py.typed +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda_unstable.egg-info/SOURCES.txt +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda_unstable.egg-info/dependency_links.txt +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda_unstable.egg-info/entry_points.txt +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda_unstable.egg-info/requires.txt +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda_unstable.egg-info/top_level.txt +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/pyproject.toml +0 -0
- {async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/setup.cfg +0 -0
|
@@ -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.
|
|
12
|
+
__version__ = "0.2.9"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import functools
|
|
2
2
|
import json
|
|
3
3
|
import logging
|
|
4
|
+
import time
|
|
4
5
|
from typing import Any, Callable, Dict, Optional
|
|
5
6
|
from uuid import uuid4
|
|
6
7
|
|
|
@@ -168,9 +169,11 @@ class AsyncLambdaController:
|
|
|
168
169
|
}
|
|
169
170
|
)
|
|
170
171
|
logger.info(
|
|
171
|
-
f"Invoking task '{destination_task.task_id}' - invocation_id '{invocation_id}'"
|
|
172
|
+
f"Invoking task '{destination_task.task_id}' - invocation_id '{invocation_id}' - delay {delay or 0}"
|
|
172
173
|
)
|
|
173
174
|
if force_sync or env.get_force_sync_mode():
|
|
175
|
+
if delay:
|
|
176
|
+
time.sleep(delay)
|
|
174
177
|
# Sync invocation with mock event/context
|
|
175
178
|
mock_event = MockLambdaEvent(sqs_payload)
|
|
176
179
|
mock_context = MockLambdaContext(destination_task.task_id)
|
|
@@ -233,7 +236,7 @@ class AsyncLambdaController:
|
|
|
233
236
|
)
|
|
234
237
|
)
|
|
235
238
|
|
|
236
|
-
@functools.wraps
|
|
239
|
+
@functools.wraps(func)
|
|
237
240
|
def inner(*args, **kwargs):
|
|
238
241
|
self.set_current_task_id(task_id)
|
|
239
242
|
return func(*args, **kwargs)
|
|
@@ -262,7 +265,7 @@ class AsyncLambdaController:
|
|
|
262
265
|
)
|
|
263
266
|
)
|
|
264
267
|
|
|
265
|
-
@functools.wraps
|
|
268
|
+
@functools.wraps(func)
|
|
266
269
|
def inner(*args, **kwargs):
|
|
267
270
|
self.set_current_task_id(task_id)
|
|
268
271
|
return func(*args, **kwargs)
|
|
@@ -291,7 +294,7 @@ class AsyncLambdaController:
|
|
|
291
294
|
)
|
|
292
295
|
)
|
|
293
296
|
|
|
294
|
-
@functools.wraps
|
|
297
|
+
@functools.wraps(func)
|
|
295
298
|
def inner(*args, **kwargs):
|
|
296
299
|
self.set_current_task_id(task_id)
|
|
297
300
|
return func(*args, **kwargs)
|
|
@@ -320,7 +323,7 @@ class AsyncLambdaController:
|
|
|
320
323
|
)
|
|
321
324
|
)
|
|
322
325
|
|
|
323
|
-
@functools.wraps
|
|
326
|
+
@functools.wraps(func)
|
|
324
327
|
def inner(*args, **kwargs):
|
|
325
328
|
self.set_current_task_id(task_id)
|
|
326
329
|
return func(*args, **kwargs)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/models/events/__init__.py
RENAMED
|
File without changes
|
{async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/models/events/api_event.py
RENAMED
|
File without changes
|
{async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/models/events/base_event.py
RENAMED
|
File without changes
|
|
File without changes
|
{async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/models/mock/mock_context.py
RENAMED
|
File without changes
|
{async-lambda-unstable-0.2.8 → async-lambda-unstable-0.2.9}/async_lambda/models/mock/mock_event.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
|
|
File without changes
|