From 0e1ea67c0e0a8b9d46783cdae7381c1a76e5159b Mon Sep 17 00:00:00 2001 From: xuanchen <122383162@qq.com> Date: Mon, 7 Feb 2022 15:45:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=8E=B7=E5=8F=96=E5=B9=B3?= =?UTF-8?q?=E5=AE=89=E8=AE=A2=E5=8D=95id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Actions/Coupon/RefreshPAOrder.php | 2 +- app/Jobs/CheckCouponByLog.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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()