#!/usr/bin/perl
use warnings;
use strict;
use AnyEvent::Redis;

my $channel = $ARGV[0] || die "usage: $0 channel\n";

my $sub = AnyEvent::Redis->new( host => $ENV{REDIS_HOST}, port => $ENV{REDIS_PORT} );

my $sub_cv = $sub->psubscribe($channel, sub {
	my($message, $chan) = @_;
	warn "# $chan | $message\n";
});

AnyEvent->condvar->recv;

