mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
get rid of local is true to remove suspicion
This commit is contained in:
parent
04cc6468dd
commit
4325bdf990
1 changed files with 1 additions and 13 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue