diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2014-09-30 18:55:13 -0400 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2014-09-30 18:55:13 -0400 |
commit | d3dda0ce8d5431fe008fc7861f4087fd7c19f8cb (patch) | |
tree | 8cd33b19c67eb5a8786fc108cff85fef8de5e272 | |
parent | 75c3857c841f3564b62a11f042adb901b206f013 (diff) |
fix bug in getting design points
-rwxr-xr-x | rtss14/database.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rtss14/database.py b/rtss14/database.py index 1f25fed..59948d4 100755 --- a/rtss14/database.py +++ b/rtss14/database.py | |||
@@ -355,7 +355,7 @@ def __get_design_points(conn, ndp): | |||
355 | c.execute('UPDATE dp_pending SET taken=%s WHERE taken=0 LIMIT %s', (request_id, ndp)) | 355 | c.execute('UPDATE dp_pending SET taken=%s WHERE taken=0 LIMIT %s', (request_id, ndp)) |
356 | nclaimed = c.rowcount | 356 | nclaimed = c.rowcount |
357 | if nclaimed > 0: | 357 | if nclaimed > 0: |
358 | c.execute('SELECT %s FROM dp_pending WHERE taken=%%s' % (','.join(dp_col_names)), request_id) | 358 | c.execute('SELECT %s FROM dp_pending WHERE taken=%%s' % (','.join(dp_col_names)), (request_id,)) |
359 | fetched = [db_to_dp(d) for d in c.fetchall()] | 359 | fetched = [db_to_dp(d) for d in c.fetchall()] |
360 | assert c.rowcount == nclaimed | 360 | assert c.rowcount == nclaimed |
361 | # reset the taken field. needed to ensure safe operation across job runs | 361 | # reset the taken field. needed to ensure safe operation across job runs |