Skip to content
Prev Previous commit
Next Next commit
chore: consistently reference constants env variables
  • Loading branch information
Michael Brewer committed Dec 27, 2021
commit 4e8329d6622c1a575f6a2f62f3b161a357f17ceb
6 changes: 3 additions & 3 deletions aws_lambda_powertools/utilities/idempotency/idempotency.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import Any, Callable, Dict, Optional, cast

from aws_lambda_powertools.middleware_factory import lambda_handler_decorator
from aws_lambda_powertools.shared.constants import IDEMPOTENCY_DISABLED_ENV
from aws_lambda_powertools.shared import constants
from aws_lambda_powertools.shared.types import AnyCallableT
from aws_lambda_powertools.utilities.idempotency.base import IdempotencyHandler
from aws_lambda_powertools.utilities.idempotency.config import IdempotencyConfig
Expand Down Expand Up @@ -58,7 +58,7 @@ def idempotent(
>>> return {"StatusCode": 200}
"""

if os.getenv(IDEMPOTENCY_DISABLED_ENV):
if os.getenv(constants.IDEMPOTENCY_DISABLED_ENV):
return handler(event, context)

config = config or IdempotencyConfig()
Expand Down Expand Up @@ -127,7 +127,7 @@ def process_order(customer_id: str, order: dict, **kwargs):

@functools.wraps(function)
def decorate(*args, **kwargs):
if os.getenv(IDEMPOTENCY_DISABLED_ENV):
if os.getenv(constants.IDEMPOTENCY_DISABLED_ENV):
return function(*args, **kwargs)

payload = kwargs.get(data_keyword_argument)
Expand Down