浏览代码

+ product@rabbit args

Sergey Korovin 7 年之前
父节点
当前提交
10e37371a8
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      telegram.pl

+ 5 - 1
telegram.pl

@@ -47,7 +47,11 @@ Mojo::IOLoop->next_tick(sub
   $hup = AnyEvent->signal(signal => "HUP", cb => \&terminate);
 
   $config->{rabbit}->{on_error} = sub { $log->error("[rabbit]".@_); terminate() };
-  $rabbit = new rabbit_async($config->{rabbit}, sub
+
+  my $rabbit_args = $config->{rabbit};
+  $rabbit_args->{product} = $NAME;
+
+  $rabbit = new rabbit_async_rec($rabbit_args, sub
   {
     $rabbit->listen_queue($config->{queue}, $config->{bind}, \&incoming_message);
   });