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