mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Debugging epc clean for new data and new error cases
This commit is contained in:
parent
095c7d0980
commit
cfc7f2a247
3 changed files with 21 additions and 4 deletions
|
|
@ -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,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 = [
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue