chore: open conversion flow + disable scout import noise
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 8s
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 8s
This commit is contained in:
@@ -12,6 +12,13 @@ function asRecordJson(value: unknown): Record<string, unknown> | undefined {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function normalizedJudgeResult(value: unknown) {
|
||||
if (typeof value !== "string") {
|
||||
return "";
|
||||
}
|
||||
return value.trim().toLowerCase();
|
||||
}
|
||||
|
||||
function isMissingTableError(error: unknown): boolean {
|
||||
return (
|
||||
typeof error === "object" &&
|
||||
@@ -199,11 +206,11 @@ export async function GET(request: NextRequest) {
|
||||
const submitEvents = actionSummary["EXTERNAL_SUBMIT_SOLUTION_SUCCESS"] || 0;
|
||||
const judgePassEvents = judgeCompleteRows.filter((row) => {
|
||||
const metadata = asRecordJson(row.metadata);
|
||||
return metadata?.overall_result === "PASS";
|
||||
return normalizedJudgeResult(metadata?.overall_result) === "pass";
|
||||
}).length;
|
||||
const judgeFailEvents = judgeCompleteRows.filter((row) => {
|
||||
const metadata = asRecordJson(row.metadata);
|
||||
return metadata?.overall_result === "FAIL";
|
||||
return normalizedJudgeResult(metadata?.overall_result) === "fail";
|
||||
}).length;
|
||||
|
||||
const conversionRate = (numerator: number, denominator: number) => {
|
||||
|
||||
Reference in New Issue
Block a user