Bladeren bron

Merge branch 'collector_11_11_liu' into dev

rkljw 5 maanden geleden
bovenliggende
commit
f79485ac6d

+ 0 - 20
app/Cache/Contracts/HashRedisInterface.php

@@ -1,20 +0,0 @@
-<?php
-
-namespace App\Cache\Contracts;
-
-interface SetRedisInterface
-{
-    public function count();
-
-    public function add(string ...$member);
-
-    public function rem(string ...$member);
-
-    public function isMember(string $member);
-
-    public function randMember($count = 1);
-
-    public function all();
-
-    public function delete();
-}

+ 0 - 20
app/Cache/Contracts/StreamRedisInterface.php

@@ -1,20 +0,0 @@
-<?php
-
-namespace App\Cache\Contracts;
-
-interface SetRedisInterface
-{
-    public function count();
-
-    public function add(string ...$member);
-
-    public function rem(string ...$member);
-
-    public function isMember(string $member);
-
-    public function randMember($count = 1);
-
-    public function all();
-
-    public function delete();
-}

+ 1 - 1
app/Job/GatherExampleJob.php

@@ -7,7 +7,7 @@ namespace App\Job;
 use Hyperf\AsyncQueue\Job;
 use App\Controller\CollectorController;
 /**
- * @Job(name="default")
+ * @Job(name="import")
  */
 class GatherExampleJob extends Job
 {

+ 32 - 4
config/autoload/redis.php

@@ -19,11 +19,39 @@ return [
         'db' => (int) env('REDIS_DB', 0),
         'pool' => [
             'min_connections' => 1,
-            'max_connections' => 10,
-            'connect_timeout' => 10.0,
-            'wait_timeout' => 3.0,
+            'max_connections' => 100,
+            'connect_timeout' => 100000000.0,
+            'wait_timeout' => 30000000.0,
             'heartbeat' => -1,
-            'max_idle_time' => (float) env('REDIS_MAX_IDLE_TIME', 60),
+            'max_idle_time' => (float) env('REDIS_MAX_IDLE_TIME', 6000000000),
         ],
+        'driver' => Hyperf\AsyncQueue\Driver\RedisDriver::class,
+        'redis' => [
+            'pool' => 'default'
+        ],
+        'channel' => '{queue:import}',
+        'timeout' => 20,
+        'retry_seconds' => 5,
+        'handle_timeout' => 10,
+        'processes' => 100,
+        'concurrent' => [
+            'limit' => 10000,
+        ],
+        'max_messages' => 0,
+    ],
+    'import' => [
+        'driver' => Hyperf\AsyncQueue\Driver\RedisDriver::class,
+        'redis' => [
+            'pool' => 'default'
+        ],
+        'channel' => '{queue:import}',
+        'timeout' => 20,
+        'retry_seconds' => 5,
+        'handle_timeout' => 10,
+        'processes' => 100,
+        'concurrent' => [
+            'limit' => 10000,
+        ],
+        'max_messages' => 0,
     ],
 ];