diff options
| author | Georgios Andreadis <G.Andreadis@student.tudelft.nl> | 2018-08-14 16:42:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-14 16:42:36 +0200 |
| commit | 9a2a98548ab50217a78d433a13da72af3001a785 (patch) | |
| tree | 7136a777a2e8ad509cecadbd986531510b5953dd /opendc/models/machine_state.py | |
| parent | cb4eafa88edd4db36f34185c9477e84346bece6e (diff) | |
| parent | 7310f720fdd48eb7b33cc41c772d9cae693d0da1 (diff) | |
Merge pull request #10 from atlarge-research/feature/sc18-experiments
feat: Implement Scheduler Reference Architecture
Diffstat (limited to 'opendc/models/machine_state.py')
| -rw-r--r-- | opendc/models/machine_state.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/opendc/models/machine_state.py b/opendc/models/machine_state.py index 7f19ba01..ad295e1a 100644 --- a/opendc/models/machine_state.py +++ b/opendc/models/machine_state.py @@ -5,7 +5,6 @@ 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', @@ -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', 'machine_id', 'experiment_id', 'tick', 'temperature_c', 'in_use_memory_mb', 'load_fraction'] COLUMNS_PRIMARY_KEY = ['id'] @@ -25,12 +24,11 @@ class MachineState(Model): """Instantiate a MachineState from a database row (including tick from the TaskState).""" 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] + machine_id=row[1], + temperature_c=row[4], + in_use_memory_mb=row[5], + load_fraction=row[6], + tick=row[3] ) @classmethod |
