p3p pairs
This commit is contained in:
@@ -66,6 +66,7 @@ def _init_db():
|
||||
"tput_results TEXT",
|
||||
"throttled TEXT",
|
||||
"coe_pair TEXT",
|
||||
"p3p_pair TEXT",
|
||||
]:
|
||||
try:
|
||||
_conn.execute(f"ALTER TABLE tests ADD COLUMN {col_def}")
|
||||
@@ -152,6 +153,19 @@ def set_coe_pair(test_row_id, coe_pair):
|
||||
)
|
||||
|
||||
|
||||
def set_p3p_pair(test_row_id, p3p_pair):
|
||||
json_value = json.dumps(p3p_pair or [])
|
||||
with _tx():
|
||||
_conn.execute(
|
||||
"""
|
||||
UPDATE tests
|
||||
SET p3p_pair = ?
|
||||
WHERE id = ?
|
||||
""",
|
||||
(json_value, test_row_id),
|
||||
)
|
||||
|
||||
|
||||
def get_station_for_test(test_id, device):
|
||||
with _lock:
|
||||
row = _conn.execute(
|
||||
|
||||
Reference in New Issue
Block a user