visuddhinanda 2 tahun lalu
induk
melakukan
1a47bd467b
1 mengubah file dengan 2 tambahan dan 3 penghapusan
  1. 2 3
      app/Http/Api/Mq.php

+ 2 - 3
app/Http/Api/Mq.php

@@ -21,8 +21,7 @@ class Mq{
             return $connection;
             return $connection;
     }
     }
     public static function publish(string $channelName, $message){
     public static function publish(string $channelName, $message){
-                //一对一
-
+       //一对一
         try{
         try{
             Log::debug('mq start {channel} {message}',['channel'=>$channelName,'message'=>$message]);
             Log::debug('mq start {channel} {message}',['channel'=>$channelName,'message'=>$message]);
             $host = config("queue.connections.rabbitmq.host");
             $host = config("queue.connections.rabbitmq.host");
@@ -111,7 +110,7 @@ class Mq{
                 try{
                 try{
                     $result = $callback(json_decode($message->body));
                     $result = $callback(json_decode($message->body));
                     if($result !== 0){
                     if($result !== 0){
-                        throw new \Exception('error');
+                        throw new \Exception('task error');
                     }
                     }
                 }catch(\Exception $e){
                 }catch(\Exception $e){
                     // push to issues
                     // push to issues