aws-python-helper 1.8.0__tar.gz → 1.8.1__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.
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/PKG-INFO +1 -1
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/context/state_validator.py +10 -2
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper.egg-info/PKG-INFO +1 -1
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/pyproject.toml +1 -1
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/README.md +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/__init__.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/api/__init__.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/api/auth_middleware.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/api/auth_validators.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/api/base.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/api/dispatcher.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/api/exceptions.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/api/fetcher.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/api/handler.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/context/__init__.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/context/session.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/database/__init__.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/database/database_proxy.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/database/external_database_proxy.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/database/external_mongo_manager.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/database/mongo_manager.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/fargate/__init__.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/fargate/executor.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/fargate/fetcher.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/fargate/handler.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/fargate/task_base.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/invoker/__init__.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/invoker/api_client.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/invoker/exceptions.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/invoker/lambda_invoker.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/lambda_standalone/__init__.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/lambda_standalone/base.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/lambda_standalone/fetcher.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/lambda_standalone/handler.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/model_index_sync/__init__.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/model_index_sync/base.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/model_query/__init__.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/model_query/base.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/monitoring/__init__.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/monitoring/run.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/permissions/__init__.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/permissions/catalog.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/repository/__init__.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/repository/audit.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/repository/base.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/sns/__init__.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/sns/publisher.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/sqs/__init__.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/sqs/consumer_base.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/sqs/fetcher.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/sqs/handler.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/utils/__init__.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/utils/json_encoder.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/utils/response.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/utils/serializer.py +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper.egg-info/SOURCES.txt +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper.egg-info/dependency_links.txt +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper.egg-info/requires.txt +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper.egg-info/top_level.txt +0 -0
- {aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/setup.cfg +0 -0
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/context/state_validator.py
RENAMED
|
@@ -11,6 +11,11 @@ class StateValidator:
|
|
|
11
11
|
"""
|
|
12
12
|
Validates that a state exists and is active in the core.states collection.
|
|
13
13
|
|
|
14
|
+
A state counts as active with either `status: "active"` or `is_active: True`.
|
|
15
|
+
The boolean is what every service has written until now; the status is what
|
|
16
|
+
the region catalog replicates. Accepting both means the boolean can be
|
|
17
|
+
dropped once no service reads it, without a flag day.
|
|
18
|
+
|
|
14
19
|
Uses an in-memory cache with a 5-minute TTL to avoid querying the database
|
|
15
20
|
on every request. Only valid (active) states are cached — invalid states
|
|
16
21
|
always hit the database so that recently activated states are picked up
|
|
@@ -23,7 +28,7 @@ class StateValidator:
|
|
|
23
28
|
@classmethod
|
|
24
29
|
async def validate(cls, state: str):
|
|
25
30
|
"""
|
|
26
|
-
Validate that state exists in core.states
|
|
31
|
+
Validate that state exists in core.states and is active.
|
|
27
32
|
|
|
28
33
|
Args:
|
|
29
34
|
state: The state name to validate
|
|
@@ -40,7 +45,10 @@ class StateValidator:
|
|
|
40
45
|
|
|
41
46
|
from ..database.mongo_manager import MongoManager
|
|
42
47
|
db = MongoManager.get_database('core')
|
|
43
|
-
doc = await db.states.find_one({
|
|
48
|
+
doc = await db.states.find_one({
|
|
49
|
+
"name": state,
|
|
50
|
+
"$or": [{"status": "active"}, {"is_active": True}],
|
|
51
|
+
})
|
|
44
52
|
|
|
45
53
|
if doc:
|
|
46
54
|
cls._cache[state] = now
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/api/auth_middleware.py
RENAMED
|
File without changes
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/api/auth_validators.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
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/database/database_proxy.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/database/mongo_manager.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
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/invoker/lambda_invoker.py
RENAMED
|
File without changes
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/lambda_standalone/__init__.py
RENAMED
|
File without changes
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/lambda_standalone/base.py
RENAMED
|
File without changes
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/lambda_standalone/fetcher.py
RENAMED
|
File without changes
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/lambda_standalone/handler.py
RENAMED
|
File without changes
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/model_index_sync/__init__.py
RENAMED
|
File without changes
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/model_index_sync/base.py
RENAMED
|
File without changes
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/model_query/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/monitoring/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/permissions/__init__.py
RENAMED
|
File without changes
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/permissions/catalog.py
RENAMED
|
File without changes
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper/repository/__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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{aws_python_helper-1.8.0 → aws_python_helper-1.8.1}/aws_python_helper.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|