Skip to content

Commit

Permalink
remove threads
Browse files Browse the repository at this point in the history
  • Loading branch information
bibendi committed Oct 3, 2013
1 parent 1b91b5b commit 3135082
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/sphinx/integration/mysql/connection_pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ def self.take_slaves(silent = true)
@take_slaves_mutex ||= Mutex.new
@agents_pool ||= {}

threads = []
#threads = []

ThinkingSphinx::Configuration.instance.agents.each do |agent_name, _|
threads << Thread.new do
#threads << Thread.new do

retries = 0
original = nil
Expand All @@ -117,12 +117,16 @@ def self.take_slaves(silent = true)
rescue Innertube::Pool::BadResource
retries += 1
retry if retries < 2
raise original
if silent
Rails.logger.warn original.message
else
raise original
end
end

end
#end
end

threads.each { |t| t.join }
#threads.each { |t| t.join }
end
end

0 comments on commit 3135082

Please sign in to comment.