Skip to content

Instantly share code, notes, and snippets.

@arockwell
Created June 12, 2011 01:03
Show Gist options
  • Select an option

  • Save arockwell/1021137 to your computer and use it in GitHub Desktop.

Select an option

Save arockwell/1021137 to your computer and use it in GitHub Desktop.
Worker for pulling tasks off a redis queue
redis = Redis.new(:host => redis_host, :port => redis_port)
while(1) do
url = redis.blpop(work_queue, 0)[1]
is_up = server_check.check(url)[0]
if is_up
puts "#{url} is up."
else
puts "#{url} is down."
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment