소스 검색

add queue name in Exception

visuddhinanda 1 년 전
부모
커밋
c6ab50f43f
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      api-v8/app/Http/Api/Mq.php

+ 4 - 3
api-v8/app/Http/Api/Mq.php

@@ -133,7 +133,8 @@ class Mq
                         throw new \Exception('task error');
                     }
                 } catch (\Exception $e) {
-                    Log::error('mq worker exception', [
+                    Log::error("mq worker {$queue} exception", [
+                        'queue' => $queue,
                         'message_id' => $message->get('message_id'),
                         'exception' => $e
                     ]);
@@ -215,8 +216,8 @@ class Mq
             try {
                 $channel->wait(null, false, $timeout);
             } catch (AMQPTimeoutException $e) {
-		    // ignore it
-	    }
+                // ignore it
+            }
         }
     }
 }