tgz 2 vuotta sitten
vanhempi
commit
e762fa34cc
3 muutettua tiedostoa jossa 9 lisäystä ja 3 poistoa
  1. 1 1
      app/Modules/Trade/Pay/OrderPaySuccess.php
  2. 7 1
      config/database.php
  3. 1 1
      config/queue.php

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

@@ -29,7 +29,7 @@ class OrderPaySuccess
                 //添加异步任务队列
                 $job = new QappOrder($trade_no);
                 myLog('pay_notify')->info('start:' . $trade_no);
-                dispatch($job->onConnection('rabbitmq')->onQueue('{qapp_order_pay_success}'));
+                dispatch($job->onConnection('redis')->onQueue('{qapp_order_pay_success}'));
                 myLog('pay_notify')->info('end:' . $trade_no);
             } catch (Exception $e) {
                 sendNotice($e->getMessage());

+ 7 - 1
config/database.php

@@ -183,7 +183,13 @@ return [
             'password' => env('REDIS_PASSWORD_CHAPTER', null),
             'port' => env('REDIS_PORT_CHAPTER', 6379),
             'database' => env('REDIS_DATABASE_CHAPTER', 0),
-        ]
+        ],
+        'redis-queue' => [
+            'host' => env('REDIS_HOST', 'localhost'),
+            'password' => env('REDIS_PASSWORD', null),
+            'port' => env('REDIS_PORT', 6379),
+            'database' => 10
+        ],
 
     ],
 

+ 1 - 1
config/queue.php

@@ -59,7 +59,7 @@ return [
 
         'redis' => [
             'driver' => 'redis',
-            'connection' => 'default',
+            'connection' => 'redis-queue',
             'queue' => 'default',
             'expire' => 60,
         ],