p3p pairs

This commit is contained in:
2026-05-27 16:07:46 -04:00
parent ba86f5830f
commit 7f253c4f74
7 changed files with 170 additions and 3 deletions
+14
View File
@@ -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(