seven před 2 dny
rodič
revize
8f9437bb6a
1 změnil soubory, kde provedl 3 přidání a 4 odebrání
  1. 3 4
      app/Jobs/PaymentJob.php

+ 3 - 4
app/Jobs/PaymentJob.php

@@ -11,7 +11,6 @@ use Illuminate\Queue\InteractsWithQueue;
 use Illuminate\Queue\SerializesModels;
 use Illuminate\Support\Facades\Log;
 use App\Services\PaymentOrderService;
-use Google\Service\Adsense\Payment;
 
 class PaymentJob implements ShouldQueue
 {
@@ -51,14 +50,14 @@ class PaymentJob implements ShouldQueue
             PaymentOrderService::syncPayOrder();
 
             // 重要:使用类名而不是 self(),避免递归
-            PaymentJob::dispatch()->delay(now()->addSeconds(15));
+            PaymentJob::dispatch()->delay(now()->addSeconds(100));
             Log::error('📅 下一个更新订单状态任务已安排');
 
         } catch (\Exception $e) {
             Log::error('❌ 更新订单状态任务执行异常: ' . $e->getMessage());
 
             // 异常后15秒重试
-            PaymentJob::dispatch()->delay(now()->addSeconds(15));
+            PaymentJob::dispatch()->delay(now()->addSeconds(100));
         }
     }
 
@@ -68,6 +67,6 @@ class PaymentJob implements ShouldQueue
         Log::error('更新订单状态任务失败: ' . $exception->getMessage());
 
         // 可选:重新分发或通知
-        dispatch(new self())->delay(now()->addSeconds(15));
+        dispatch(new self())->delay(now()->addSeconds(100));
     }
 }