yemeishu 4 dagar sedan
förälder
incheckning
ec63b657ad
1 ändrade filer med 4 tillägg och 11 borttagningar
  1. 4 11
      ai_parse_sync.php

+ 4 - 11
ai_parse_sync.php

@@ -80,17 +80,10 @@ if (empty($selectedImports)) {
 }
 
 echo "\n设置并发参数:\n";
-echo "并发进程数 (建议 4-8,默认为 4): ";
-$workers = (int)trim(fgets(STDIN));
-if ($workers <= 0) {
-    $workers = 4;
-}
-
-echo "每个进程的批次大小 (默认 10): ";
-$batchSize = (int)trim(fgets(STDIN));
-if ($batchSize <= 0) {
-    $batchSize = 10;
-}
+$workers = (int) env('AI_PARSE_WORKERS', 2);
+$batchSize = (int) env('AI_PARSE_BATCH', 10);
+echo "并发进程数: {$workers}\n";
+echo "每个进程的批次大小: {$batchSize}\n";
 
 echo "\n=== 开始执行 AI 解析 (并发模式: {$workers} 进程) ===\n\n";