diff options
| author | Georgios Andreadis <G.Andreadis@student.tudelft.nl> | 2017-08-10 09:40:26 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-10 09:40:26 +0300 |
| commit | bc70e6ae115beb469541c12014ffdecc01a1e50c (patch) | |
| tree | 935c2ef5b1621b0e13ec76f2ca02f6912940d690 /opendc/models/rack_state.py | |
| parent | 5d42f30ed30aa5b6970304569c6bd01c16078759 (diff) | |
| parent | 54617bf3268c27d63a40844216760a49f28d39e0 (diff) | |
Merge pull request #9 from atlarge-research/mariadb
Migration to MariaDB
Diffstat (limited to 'opendc/models/rack_state.py')
| -rw-r--r-- | opendc/models/rack_state.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/opendc/models/rack_state.py b/opendc/models/rack_state.py index 77cafd95..e43dc940 100644 --- a/opendc/models/rack_state.py +++ b/opendc/models/rack_state.py @@ -32,7 +32,7 @@ class RackState(Model): FROM racks JOIN machines ON racks.id = machines.rack_id JOIN machine_states ON machines.id = machine_states.machine_id - WHERE machine_states.experiment_id = ? + WHERE machine_states.experiment_id = %s GROUP BY machine_states.tick, racks.id ''' results = database.fetchall(statement, (experiment_id,)) @@ -53,8 +53,8 @@ class RackState(Model): FROM racks JOIN machines ON racks.id = machines.rack_id JOIN machine_states ON machines.id = machine_states.machine_id - WHERE machine_states.experiment_id = ? - AND machine_states.tick = ? + WHERE machine_states.experiment_id = %s + AND machine_states.tick = %s GROUP BY machine_states.tick, racks.id ''' results = database.fetchall(statement, (experiment_id, tick)) |
