projects
/
MQR.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into smtp
[MQR.git]
/
scripts
/
mqr-subscribe.pl
diff --git
a/scripts/mqr-subscribe.pl
b/scripts/mqr-subscribe.pl
index
a7d232f
..
9744349
100755
(executable)
--- a/
scripts/mqr-subscribe.pl
+++ b/
scripts/mqr-subscribe.pl
@@
-3,12
+3,9
@@
use warnings;
use strict;
use AnyEvent::Redis;
use strict;
use AnyEvent::Redis;
-our ( $redis_host, $redis_port );
-require 'config.pl';
-
my $channel = $ARGV[0] || die "usage: $0 channel\n";
my $channel = $ARGV[0] || die "usage: $0 channel\n";
-my $sub = AnyEvent::Redis->new( host => $
redis_host, port => $redis_port
);
+my $sub = AnyEvent::Redis->new( host => $
ENV{REDIS_HOST}, port => $ENV{REDIS_PORT}
);
my $sub_cv = $sub->psubscribe($channel, sub {
my($message, $chan) = @_;
my $sub_cv = $sub->psubscribe($channel, sub {
my($message, $chan) = @_;