diff --git a/backend/app/db/functions/tasks/Tasks.py b/backend/app/db/functions/tasks/Tasks.py index 30acf370..4aa7fb43 100644 --- a/backend/app/db/functions/tasks/Tasks.py +++ b/backend/app/db/functions/tasks/Tasks.py @@ -27,6 +27,7 @@ class SubTaskInterface: # -------------------------------------------------------- def create_subtask(self, task_id: UUID, inputs: Optional[Dict[str, Any]] = None, status=None): + now = datetime.now(timezone.utc) with get_db_session() as session: task = session.get(Task, task_id) if not task: @@ -39,7 +40,7 @@ class SubTaskInterface: task_id=task_id, inputs=json.dumps(inputs) if inputs else None, status=status, - job_started=None, + job_started=now, job_completed=None, ) @@ -271,12 +272,13 @@ class TasksInterface: :param task_only: If True, only create the Task record, without a SubTask :return: """ + now = datetime.now(timezone.utc) with get_db_session() as session: task = Task( task_source=task_source, service=service, status="waiting", - job_started=None, + job_started=now, job_completed=None, ) diff --git a/etl/epc/settings.py b/etl/epc/settings.py index d453080e..f4d0e174 100644 --- a/etl/epc/settings.py +++ b/etl/epc/settings.py @@ -51,8 +51,17 @@ DATA_ANOMALY_MATCHES = { "UNKNOWN", # "Unknown", - # Observed error case + # Observed error cases "(error), (error)", + "error , error", + "Description", + "description", + "Undefined Welsh description for crtrl code 2113", + "undefined welsh description for crtrl code 2113", + "Hot water system", + "hot water system", + "Heating system", + "heating system", } # Add the post_sap10 date to indicate if the epc is post sap10 diff --git a/etl/epc_clean/epc_attributes/MainheatControlAttributes.py b/etl/epc_clean/epc_attributes/MainheatControlAttributes.py index 0dcf97c5..3e2df543 100644 --- a/etl/epc_clean/epc_attributes/MainheatControlAttributes.py +++ b/etl/epc_clean/epc_attributes/MainheatControlAttributes.py @@ -119,7 +119,13 @@ class MainheatControlAttributes(Definitions): 'rheoli r tal a llaw': 'manual charge control', 'tal un gyfradd, thermostat ystafell yn unig': 'flat rate charging, room thermostat only', "rheoli'r t l llaw": "manual charge control", - "2205 rhaglennydd ac o leiaf ddau thermostat ystafell": "programmer and at least two room thermostats" + "2205 rhaglennydd ac o leiaf ddau thermostat ystafell": "programmer and at least two room thermostats", + "2603 rhaglennydd a thermostatau ar y cyfarpar": "programmer, room thermostat", + "2404 rheolyddion i wresogyddion storio sygçön cadw llawer o wres": "controls for high heat retention storage " + "heaters", + 'system dalu wedigçöi chysylltu +ó defnyddio gwres cymunedol, rhaglennydd ac o leiaf ddau thermostat ' + 'ystafell': 'charging system linked to use of community heating, programmer and at least two room thermostats' + } NO_DATA_DESCRIPTIONS = [