Completed
Push — health ( 1849cb...fddfa2 )
by
unknown
44s
created
src/SWP/Bundle/CoreBundle/Controller/DefaultController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
           }
103 103
       } catch (\Throwable $e) {
104 104
           // Log error for debugging
105
-          error_log('PostgreSQL health check failed: ' . $e->getMessage());
105
+          error_log('PostgreSQL health check failed: '.$e->getMessage());
106 106
           $status['postgres'] = 'red';
107 107
       }
108 108
 
@@ -112,13 +112,13 @@  discard block
 block discarded – undo
112 112
           $status['elasticsearch'] = 'green';
113 113
       } catch (\Throwable $e) {
114 114
           // Log error for debugging
115
-          error_log('Elasticsearch health check failed: ' . $e->getMessage());
115
+          error_log('Elasticsearch health check failed: '.$e->getMessage());
116 116
           $status['elasticsearch'] = 'red';
117 117
       }
118 118
 
119 119
       // Check Memcached (Symfony Cache)
120 120
       try {
121
-          $cacheKey = 'health_check_' . uniqid();
121
+          $cacheKey = 'health_check_'.uniqid();
122 122
           $cacheItem = $cachePool->getItem($cacheKey);
123 123
           $cacheItem->set('ok');
124 124
           $cachePool->save($cacheItem);
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
           $status['memcached'] = 'green';
127 127
       } catch (\Throwable $e) {
128 128
           // Log error for debugging
129
-          error_log('Memcached health check failed: ' . $e->getMessage());
129
+          error_log('Memcached health check failed: '.$e->getMessage());
130 130
           $status['memcached'] = 'red';
131 131
       }
132 132
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
       try {
135 135
           $amqp = new \AMQPConnection([
136 136
               'host'     => $_ENV['RABBIT_MQ_HOST'] ?? 'localhost',
137
-              'port'     => (int)($_ENV['RABBIT_MQ_PORT'] ?? 5672),
137
+              'port'     => (int) ($_ENV['RABBIT_MQ_PORT'] ?? 5672),
138 138
               'login'    => $_ENV['RABBIT_MQ_USER'] ?? 'guest',
139 139
               'password' => $_ENV['RABBIT_MQ_PASSWORD'] ?? 'guest',
140 140
               'vhost'    => $_ENV['RABBIT_MQ_VHOST'] ?? '/',
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
           }
146 146
       } catch (\Throwable $e) {
147 147
           // Log error for debugging
148
-          error_log('RabbitMQ health check failed: ' . $e->getMessage());
148
+          error_log('RabbitMQ health check failed: '.$e->getMessage());
149 149
           $status['rabbitmq'] = 'red';
150 150
       }
151 151
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
           }
181 181
       } catch (\Throwable $e) {
182 182
           // Log error for debugging
183
-          error_log('Supervisor health check failed: ' . $e->getMessage());
183
+          error_log('Supervisor health check failed: '.$e->getMessage());
184 184
           $status['supervisor'] = 'red';
185 185
       }
186 186
 
Please login to merge, or discard this patch.