Browse Source

Move notification jobs back to main redis

pull/4352/head
nanaya 4 months ago
parent
commit
58b1ad9e4c
5 changed files with 4 additions and 13 deletions
  1. 0
    1
      .env.example
  2. 2
    2
      app/Events/NotificationEventBase.php
  3. 1
    1
      app/Traits/NotificationQueue.php
  4. 1
    1
      config/osu.php
  5. 0
    8
      config/queue.php

+ 0
- 1
.env.example View File

@@ -190,7 +190,6 @@ SITE_SWITCHER_JS_HASH=
190 190
 # USER_MAX_MULTIPLAYER_ROOMS_SUPPORTER=5
191 191
 
192 192
 # NOTIFICATION_QUEUE=notification
193
-# NOTIFICATION_QUEUE_CONNECTION=redis-notification
194 193
 # NOTIFICATION_REDIS_HOST=127.0.0.1
195 194
 # NOTIFICATION_REDIS_PORT=6379
196 195
 # NOTIFICATION_SERVER_LISTEN_HOST=127.0.0.1

+ 2
- 2
app/Events/NotificationEventBase.php View File

@@ -24,10 +24,10 @@ use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
24 24
 
25 25
 abstract class NotificationEventBase implements ShouldBroadcast
26 26
 {
27
-    public $connection;
27
+    public $broadcastQueue;
28 28
 
29 29
     public function __construct()
30 30
     {
31
-        $this->connection = config('osu.notification.queue_connection');
31
+        $this->broadcastQueue = config('osu.notification.queue_name');
32 32
     }
33 33
 }

+ 1
- 1
app/Traits/NotificationQueue.php View File

@@ -24,6 +24,6 @@ trait NotificationQueue
24 24
 {
25 25
     public function dispatch()
26 26
     {
27
-        dispatch($this->onConnection(config('osu.notification.queue_connection')));
27
+        dispatch($this->onQueue(config('osu.notification.queue_name')));
28 28
     }
29 29
 }

+ 1
- 1
config/osu.php View File

@@ -103,7 +103,7 @@ return [
103 103
     ],
104 104
     'notification' => [
105 105
         'endpoint' => presence(env('NOTIFICATION_ENDPOINT'), '/home/notifications/feed'),
106
-        'queue_connection' => presence(env('NOTIFICATION_QUEUE_CONNECTION'), 'redis-notification'),
106
+        'queue_name' => presence(env('NOTIFICATION_QUEUE'), 'notification'),
107 107
     ],
108 108
     'search' => [
109 109
         'minimum_length' => get_int(env('SEARCH_MINIMUM_LENGTH', 2)),

+ 0
- 8
config/queue.php View File

@@ -47,14 +47,6 @@ return [
47 47
             'queue' => 'default',
48 48
             'retry_after' => 305, // our longest job timeout is 5m, plus 5s to allow time for workers to be killed
49 49
         ],
50
-
51
-        'redis-notification' => [
52
-            'driver' => 'redis',
53
-            'connection' => 'notification',
54
-            'queue' => presence(env('NOTIFICATION_QUEUE'), 'notification'),
55
-            'retry_after' => 305, // our longest job timeout is 5m, plus 5s to allow time for workers to be killed
56
-        ],
57
-
58 50
     ],
59 51
 
60 52
     /*

Loading…
Cancel
Save