Skip to content

Commit

Permalink
Use os.environ to get environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
alexobaseki committed Jun 7, 2024
1 parent a218a7c commit 2283a86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def process_import_function(event, context):
return

bucket = messages[0].get("bucket")
file_archiving_enabled = context.file_archiving_enabled
file_archiving_enabled = os.environ.get("FILE_ARCHIVING_ENABLED")
for message in messages:
bucket = message.get("bucket")
key = message.get("file_path")
Expand All @@ -65,7 +65,7 @@ def process_import_function(event, context):
# Archiving processed realtime bills defaults to False, except it was
# explicitly set on cli or on task-definitions Repo as <--archive>
# or added on AWS admin console for os-realtime lambda function
# config as file_archiving_enabled=True
# config as FILE_ARCHIVING_ENABLED=True
file_archiving_enabled = (
message.get("file_archiving_enabled") or file_archiving_enabled
)
Expand Down

0 comments on commit 2283a86

Please sign in to comment.