瀏覽代碼

add isConnected

visuddhinanda 1 月之前
父節點
當前提交
338cbe71fc
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      api-v13/app/Services/RabbitMQService.php

+ 5 - 0
api-v13/app/Services/RabbitMQService.php

@@ -41,6 +41,11 @@ class RabbitMQService
         $this->channel->basic_qos(null, 1, null);
     }
 
+    public function isConnected()
+    {
+        return $this->connection->isConnected();
+    }
+
     public function getChannel(): AMQPChannel
     {
         return $this->channel;