lib/resque-sliders/commander.rb in resque-sliders-0.0.4 vs lib/resque-sliders/commander.rb in resque-sliders-0.0.5

- old
+ new

@@ -13,11 +13,11 @@ @stale_hosts = Resque.redis.keys("#{key_prefix}:*").map { |x| y = x.split(':').last; y unless x == host_config_key or hosts.include?(y) }.compact.sort end # Return Array of currently online hosts def hosts - @host_status.keys.select { |x| x unless x.split(':').last == 'reload' }.map { |x| x.split(':').first }.uniq.sort + @host_status.keys.select { |x| x unless %w(reload pause stop).include? x.split(':').last }.map { |x| x.split(':').first }.uniq.sort end # Array of all hosts (current + stale) def all_hosts (hosts + stale_hosts).sort @@ -58,14 +58,9 @@ # Deletes queue for host. # Returns boolean. def delete(host, queue) redis_del_hash("#{key_prefix}:#{host}", queue) - end - - # Sets reload flag on field of config_key to reload host's KEWatcher - def reload(host) - redis_set_hash(host_config_key, "#{host}:reload", 1) end end end end