diff --git a/backend/address2UPRN/main.py b/backend/address2UPRN/main.py index 79c0de69..28ad344f 100644 --- a/backend/address2UPRN/main.py +++ b/backend/address2UPRN/main.py @@ -563,14 +563,14 @@ def handler(event, context, local=False): except Exception as s3_error: logger.error(f"Failed to save results to S3: {s3_error}") - # Mark subtask as completed + # Mark subtask as complete try: subtask_interface.update_subtask_status( subtask_id, - "completed", + "complete", outputs={"rows_processed": "todo -> show sensible output"}, ) - logger.info(f"Marked subtask {subtask_id} as completed") + logger.info(f"Marked subtask {subtask_id} as complete") except Exception as db_error: logger.error(f"Failed to mark subtask as completed: {db_error}") diff --git a/backend/app/db/functions/tasks/Tasks.py b/backend/app/db/functions/tasks/Tasks.py index 6c0fe89e..96980e78 100644 --- a/backend/app/db/functions/tasks/Tasks.py +++ b/backend/app/db/functions/tasks/Tasks.py @@ -195,7 +195,7 @@ class SubTaskInterface: task.status = "failed" task.job_completed = now - elif all(s in ("complete", "completed") for s in statuses): + elif all(s == "complete" for s in statuses): task.status = "complete" task.job_completed = now diff --git a/backend/postcode_splitter/main.py b/backend/postcode_splitter/main.py index 4f63ed4b..3d4b9aa0 100644 --- a/backend/postcode_splitter/main.py +++ b/backend/postcode_splitter/main.py @@ -263,10 +263,10 @@ def handler(event, context, local=False): bucket_name=bucket_name, ) - # Mark subtask as completed + # Mark subtask as complete subtask_interface.update_subtask_status( subtask_id, - "completed", + "complete", outputs={"rows_processed": "completed"}, )