diff --git a/app/Admin/Actions/Coupon/RefreshPAOrder.php b/app/Admin/Actions/Coupon/RefreshPAOrder.php index 299b64f..99e0a2f 100644 --- a/app/Admin/Actions/Coupon/RefreshPAOrder.php +++ b/app/Admin/Actions/Coupon/RefreshPAOrder.php @@ -21,7 +21,7 @@ class RefreshPAOrder extends Action $table = 'api_log_'.$month; CheckCouponLog::dispatch($table); - CheckCouponByLog::dispatch($table)->delay(now()->addMinutes(10));; + CheckCouponByLog::dispatch($table, 10); return $this->response()->success('正在获取数据,请等待片刻后刷新页面查看!')->refresh(); } diff --git a/app/Jobs/CheckCouponByLog.php b/app/Jobs/CheckCouponByLog.php index bc86db0..b3b9fa8 100644 --- a/app/Jobs/CheckCouponByLog.php +++ b/app/Jobs/CheckCouponByLog.php @@ -23,9 +23,10 @@ class CheckCouponByLog implements ShouldQueue protected $table; - public function __construct(string $table) + public function __construct(string $table, int $delay = 0) { $this->table = $table; + $this->delay = $delay; } public function handle()