summaryrefslogtreecommitdiff
path: root/opendc/models/machine_state.py
diff options
context:
space:
mode:
Diffstat (limited to 'opendc/models/machine_state.py')
-rw-r--r--opendc/models/machine_state.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/opendc/models/machine_state.py b/opendc/models/machine_state.py
index 1da37c80..ad295e1a 100644
--- a/opendc/models/machine_state.py
+++ b/opendc/models/machine_state.py
@@ -5,7 +5,7 @@ from opendc.util import database
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',
@@ -14,7 +14,7 @@ class MachineState(Model):
}
TABLE_NAME = 'machine_states'
- COLUMNS = ['id', 'task_id', 'experiment_id', 'tick', 'temperature_c', 'in_use_memory_mb',
+ COLUMNS = ['id', 'machine_id', 'experiment_id', 'tick', 'temperature_c', 'in_use_memory_mb',
'load_fraction']
COLUMNS_PRIMARY_KEY = ['id']
@@ -24,7 +24,7 @@ class MachineState(Model):
"""Instantiate a MachineState from a database row (including tick from the TaskState)."""
return cls(
- task_id=row[1],
+ machine_id=row[1],
temperature_c=row[4],
in_use_memory_mb=row[5],
load_fraction=row[6],