diff --git a/src/dispatch_checker.jl b/src/dispatch_checker.jl index e43e493..3d4c848 100644 --- a/src/dispatch_checker.jl +++ b/src/dispatch_checker.jl @@ -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