Răsfoiți Sursa

fix(pdf): extend analysis report job timeout to reduce worker timeouts

Align analysis PDF queue job timeout with heavy report rendering workload so report PDFs are less likely to fail while exam PDFs still succeed.

Made-with: Cursor
yemeishu 2 săptămâni în urmă
părinte
comite
b9cf932e00
1 a modificat fișierele cu 9 adăugiri și 0 ștergeri
  1. 9 0
      app/Jobs/GenerateAnalysisPdfJob.php

+ 9 - 0
app/Jobs/GenerateAnalysisPdfJob.php

@@ -15,10 +15,19 @@ class GenerateAnalysisPdfJob implements ShouldQueue
     use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
 
     public string $paperId;
+
     public string $studentId;
+
     public ?string $recordId;
+
     public int $maxAttempts = 3;
 
+    /**
+     * 学情报告 HTML + 数据聚合比「整卷合并 PDF」更重,默认 60s 队列超时容易在 worker 侧被提前杀掉,
+     * 表现为「卷子 PDF 正常、分析报告 PDF 一直失败」。与 {@see GenerateExamPdfJob} 对齐。
+     */
+    public int $timeout = 300;
+
     public function __construct(string $paperId, string $studentId, ?string $recordId = null)
     {
         $this->paperId = $paperId;