Explorar o código

fix(calibration): skip online health scan

yemeishu hai 2 semanas
pai
achega
865e12a4bd

+ 2 - 5
app/Services/Analytics/QuestionDifficultyCalibrationService.php

@@ -146,7 +146,6 @@ class QuestionDifficultyCalibrationService
 
         $types = array_values(array_unique(array_values($questionTypeByQid)));
         $baselines = $this->buildGlobalBaselines($types);
-        $healthScaleByType = [];
 
         $now = now();
         $upserts = [];
@@ -179,10 +178,8 @@ class QuestionDifficultyCalibrationService
 
             $questionType = $questionTypeByQid[$canonicalQid] ?? ($questionTypeByQid[$qid] ?? 'unknown');
             $baselineErr = $this->resolveBaselineErrorRate($questionType, $paperDifficultyCategory, $baselines);
-            if (! isset($healthScaleByType[$questionType])) {
-                $healthScaleByType[$questionType] = $this->getHealthScaleForType($questionType);
-            }
-            $healthScale = (float) $healthScaleByType[$questionType];
+            // 不丢弃任何校准样本;仅关闭在线健康监控的 JSON 扫描,避免异步校准长时间占用队列。
+            $healthScale = 1.0;
 
             $estimate = $this->estimateOnlineBySingleOutcome(
                 $originalDifficulty,