Explorar o código

+ product@rabbit args

Sergey Korovin %!s(int64=7) %!d(string=hai) anos
pai
achega
10e37371a8
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  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);
   });