update: patch on is_dispatchable logic

- clock test logic of run 221 - 233 was wrong
- psbid 860, 889, 876, 892 actually passed the clock test
This commit is contained in:
Wataru Otsubo 2024-10-04 20:06:19 +09:00
parent ce5931a928
commit 5eaad80b93

View file

@ -8,6 +8,7 @@ module DispatchChecker
using SQLite
using DBInterface
using DataFrames
using Printf
export DbConnection
export is_dispatchable
@ -52,13 +53,24 @@ function is_dispatchable(conn::DbConnection, psbid::Int64)
nrow(single_results) == 1 && let
single_result = Tables.rowtable(single_results) |> first
single_result.resistance_test_passed == 1 &&
single_result.qspip == 1 &&
single_result.recov == 1 &&
single_result.power == 1 &&
single_result.clock == 1
# Clock test update was wrong
# manually assign to psboards whose clock test failed
if 221 <= single_result.runid < 234
if single_result.psboard_id == 915
false
elseif single_result.psboard_id in [860, 889, 876, 892]
# though 860 has 2+ rows
true
end
else
single_result.resistance_test_passed == 1 &&
single_result.qspip == 1 &&
single_result.recov == 1 &&
single_result.power == 1 &&
single_result.clock == 1
end
end
@debug "" is_single_passed single_results
@debug "" is_single_passed single_results single_results.note
is_extra_passed::Bool =
nrow(extra_results) == 1 && let
extra_result = Tables.rowtable(extra_results) |> first
@ -77,7 +89,7 @@ function is_dispatchable(conn::DbConnection, psbid::Int64)
f4 =
!ismissing(extra_result.bcid_fail) &&
extra_result.bcid_fail >= extra_result.num_tests * THRESHOLD_BCID_FAIL
@debug "" extra_result f1 f2 f3 f4
@debug "" extra_result extra_result.note f1 f2 f3 f4
!(f1 || f2 || f3 || f4)
end
@debug "" is_extra_passed extra_results