This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/lib/resque_ext.rb

8 lines
236 B
Ruby

module ResqueExt
#
# ResqueExt.unregister_workers_for_host("ec210-250-192-51")
#
def self.unregister_workers_for_host(host)
Resque.workers.select{|worker| worker.id.split(':').first==host}.each(&:unregister_worker)
end
end