summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2018-02-16 12:14:22 +0100
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2018-02-16 12:14:22 +0100
commit19d28d270ed6f99d0ec7ef40d8a5450eda25d455 (patch)
tree10e4c9741f79c8a9fce6ec6bb006e27f85577c9d
parentcd116ba5063b9bfda029196b310207b45e21604a (diff)
parent4e8e897e1c15c58ac32a4ad1aebd60ada96479de (diff)
Merge branch 'bug/task-machine' into 'master'
bug: Fix model according to new schema See merge request opendc/opendc-web-server!10
-rw-r--r--opendc/models/machine_state.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/opendc/models/machine_state.py b/opendc/models/machine_state.py
index 7f19ba01..1da37c80 100644
--- a/opendc/models/machine_state.py
+++ b/opendc/models/machine_state.py
@@ -6,7 +6,6 @@ class MachineState(Model):
JSON_TO_PYTHON_DICT = {
'MachineState': {
'taskId': 'task_id',
- 'machineId': 'machine_id',
'temperatureC': 'temperature_c',
'inUseMemoryMb': 'in_use_memory_mb',
'loadFraction': 'load_fraction',
@@ -15,7 +14,7 @@ class MachineState(Model):
}
TABLE_NAME = 'machine_states'
- COLUMNS = ['id', 'task_id', 'machine_id', 'experiment_id', 'tick', 'temperature_c', 'in_use_memory_mb',
+ COLUMNS = ['id', 'task_id', 'experiment_id', 'tick', 'temperature_c', 'in_use_memory_mb',
'load_fraction']
COLUMNS_PRIMARY_KEY = ['id']
@@ -26,11 +25,10 @@ class MachineState(Model):
return cls(
task_id=row[1],
- machine_id=row[2],
- temperature_c=row[5],
- in_use_memory_mb=row[6],
- load_fraction=row[7],
- tick=row[4]
+ temperature_c=row[4],
+ in_use_memory_mb=row[5],
+ load_fraction=row[6],
+ tick=row[3]
)
@classmethod