Skip to content

Instantly share code, notes, and snippets.

@chaslemley
Created September 5, 2012 15:14
Show Gist options
  • Save chaslemley/3638160 to your computer and use it in GitHub Desktop.
Save chaslemley/3638160 to your computer and use it in GitHub Desktop.
Retire Resque Workers
retired_hosts = %w{ip-10-30-154-136 ip-11-30-159-135}
Resque::workers.map do |worker|
host = worker.id.split(":").first
if retired_hosts.include? host
worker.unregister_worker
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment