mirror of
https://gitlab.cern.ch/wotsubo/PSBoardDataBase.git
synced 2025-06-08 05:55:42 +09:00
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:
parent
ce5931a928
commit
5eaad80b93
1 changed files with 19 additions and 7 deletions
|
@ -8,6 +8,7 @@ module DispatchChecker
|
||||||
using SQLite
|
using SQLite
|
||||||
using DBInterface
|
using DBInterface
|
||||||
using DataFrames
|
using DataFrames
|
||||||
|
using Printf
|
||||||
|
|
||||||
export DbConnection
|
export DbConnection
|
||||||
export is_dispatchable
|
export is_dispatchable
|
||||||
|
@ -52,13 +53,24 @@ function is_dispatchable(conn::DbConnection, psbid::Int64)
|
||||||
nrow(single_results) == 1 && let
|
nrow(single_results) == 1 && let
|
||||||
single_result = Tables.rowtable(single_results) |> first
|
single_result = Tables.rowtable(single_results) |> first
|
||||||
|
|
||||||
single_result.resistance_test_passed == 1 &&
|
# Clock test update was wrong
|
||||||
single_result.qspip == 1 &&
|
# manually assign to psboards whose clock test failed
|
||||||
single_result.recov == 1 &&
|
if 221 <= single_result.runid < 234
|
||||||
single_result.power == 1 &&
|
if single_result.psboard_id == 915
|
||||||
single_result.clock == 1
|
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
|
end
|
||||||
@debug "" is_single_passed single_results
|
@debug "" is_single_passed single_results single_results.note
|
||||||
is_extra_passed::Bool =
|
is_extra_passed::Bool =
|
||||||
nrow(extra_results) == 1 && let
|
nrow(extra_results) == 1 && let
|
||||||
extra_result = Tables.rowtable(extra_results) |> first
|
extra_result = Tables.rowtable(extra_results) |> first
|
||||||
|
@ -77,7 +89,7 @@ function is_dispatchable(conn::DbConnection, psbid::Int64)
|
||||||
f4 =
|
f4 =
|
||||||
!ismissing(extra_result.bcid_fail) &&
|
!ismissing(extra_result.bcid_fail) &&
|
||||||
extra_result.bcid_fail >= extra_result.num_tests * THRESHOLD_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)
|
!(f1 || f2 || f3 || f4)
|
||||||
end
|
end
|
||||||
@debug "" is_extra_passed extra_results
|
@debug "" is_extra_passed extra_results
|
||||||
|
|
Loading…
Add table
Reference in a new issue