File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 1717failure_queue_url = os .environ ["AWS_SQS_QUEUE_URL" ]
1818delta_table_name = os .environ ["DELTA_TABLE_NAME" ]
1919delta_source = os .environ ["SOURCE" ]
20+ delta_ttl = os .environ ["DELTA_TTL" ]
2021region_name = "eu-west-2"
2122logging .basicConfig ()
2223logger = logging .getLogger ()
@@ -73,7 +74,7 @@ def get_imms_id(primary_key: str) -> str:
7374
7475def get_creation_and_expiry_times (creation_timestamp : float ) -> (str , int ):
7576 creation_datetime = datetime .fromtimestamp (creation_timestamp , UTC )
76- expiry_datetime = creation_datetime + timedelta (days = 30 )
77+ expiry_datetime = creation_datetime + timedelta (days = int ( delta_ttl ) )
7778 expiry_timestamp = int (expiry_datetime .timestamp ())
7879 return creation_datetime .isoformat (), expiry_timestamp
7980
Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ resource "aws_lambda_function" "delta_sync_lambda" {
138138 environment {
139139 variables = {
140140 DELTA_TABLE_NAME = aws_dynamodb_table.delta- dynamodb- table.name
141+ DELTA_TTL = 30
141142 AWS_SQS_QUEUE_URL = aws_sqs_queue.dlq.id
142143 SOURCE = " IEDS"
143144 SPLUNK_FIREHOSE_NAME = module.splunk.firehose_stream_name
You can’t perform that action at this time.
0 commit comments