turn utf8 off before pushing to redis
[MQR.git] / scripts / mqr-subscribe.pl
1 #!/usr/bin/perl
2 use warnings;
3 use strict;
4 use AnyEvent::Redis;
5
6 my $channel = $ARGV[0] || die "usage: $0 channel\n";
7
8 my $sub = AnyEvent::Redis->new( host => $ENV{REDIS_HOST}, port => $ENV{REDIS_PORT} );
9
10 my $sub_cv = $sub->psubscribe($channel, sub {
11         my($message, $chan) = @_;
12         warn "# $chan | $message\n";
13 });
14
15 AnyEvent->condvar->recv;
16