From 4325bdf9900b3abc4e1d8f17c572f181136e18c8 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Thu, 12 Feb 2026 16:05:16 +0000 Subject: [PATCH] get rid of local is true to remove suspicion --- backend/postcode_splitter/main.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/backend/postcode_splitter/main.py b/backend/postcode_splitter/main.py index 8c0048e2..e834c44e 100644 --- a/backend/postcode_splitter/main.py +++ b/backend/postcode_splitter/main.py @@ -97,7 +97,7 @@ def send_to_address2uprn_queue(task_id: str, rows: list) -> str: return response["MessageId"] -def handler(event, context, local=False): +def handler(event, context): print(f"Function: {context.function_name}") print(f"Request ID: {context.aws_request_id}") @@ -117,12 +117,6 @@ def handler(event, context, local=False): task_id = None subtask_id = None try: - # For local development - if local is True: - record = {} - record["body"] = ( - '{"task_id":"e31f2f21-175b-4a91-a3ec-a6baa325e917","s3_uri":"s3://retrofit-data-dev/ara_raw_inputs/peabody/2025_11_11 - Peabody - Data Extracts for Domna_transformed.csv"}' - ) # Parse body (inputs) if isinstance(record.get("body"), str): body = json.loads(record["body"]) @@ -161,13 +155,7 @@ def handler(event, context, local=False): csv_data = read_csv_from_s3_dict(bucket, key) df = pd.DataFrame(csv_data) - # just do 5 well we are testing, sqs connection - if local: - df = df.head(5) - # TODO: DELETE ME, if you see this in the PR. - # TODO: DELETE ME, if you see this in the PR. - # TODO: DELETE ME, if you see this in the PR. df = df.head(1983) logger.info(f"CSV loaded: {len(df)} rows, {len(df.columns)} columns")