Browse Source

c端队列

tgz 2 years ago
parent
commit
86525b1922
1 changed files with 7 additions and 7 deletions
  1. 7 7
      app/Modules/Trade/Pay/OrderPaySuccess.php

+ 7 - 7
app/Modules/Trade/Pay/OrderPaySuccess.php

@@ -25,14 +25,14 @@ class OrderPaySuccess
         $is_change = self::orderAcrossDay($order);
         $order->transaction_id = $transaction_id;
         if ($order) {
+            try {
+                //添加异步任务队列
+                $job = new QappOrder($trade_no);
+                dispatch($job->onConnection('redis')->delay(5)->onQueue('{qapp_order_pay_success}'));
+            } catch (Exception $e) {
+                sendNotice($e->getMessage());
+            }
             if ($order->status == 'PAID') {
-                try {
-                    //添加异步任务队列
-                    $job = new QappOrder($trade_no);
-                    dispatch($job->onConnection('redis')->delay(30)->onQueue('{qapp_order_pay_success}'));
-                } catch (Exception $e) {
-                    sendNotice($e->getMessage());
-                }
                 myLog('pay_notify')->info('has_pay:' . $trade_no);
                 return true;
             }