#!/usr/bin/env ruby

require File.expand_path('../lib/archive_bot', __FILE__)

include ArchiveBot::Redis

r1 = make_redis
r2 = make_redis

begin
  r1.subscribe(updates_channel) do |on|
    on.message do |chan, msg|
      $stdout.puts msg
      $stdout.flush
    end
  end
rescue Errno::ECONNRESET, Errno::EPIPE
  # whatever, just exit
end
