Solution: The unregister_workers_for_host method below.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Resque | |
def self.unregister_workers_for_host(host) | |
Resque.workers.select{|worker| worker.id.split(':').first==host}.each(&:unregister_worker) | |
end | |
end | |
Resque.unregister_workers_for_host("ip-10-250-192-51") |
No comments:
Post a Comment