search for: build_match

Displaying 1 result from an estimated 1 matches for "build_match".

Did you mean: build&match
2008 Mar 18
1
Polling is REALLY slow
...oll_queue end def build_all_matches(args = nil) thread_pool.defer(args) do |args| requests = Request.find_active(:all) requests.each { |request| request.queue! } # using acts_as_state_machine end end protected # Was hoping to get multiple threads processing def build_matches(args = nil) thread_pool.defer(args) do |args| request = Request.find(args.to_i) request.build_matches end end def poll_queue Thread.new do while @running do sleep_time = QUEUE_SLEEP_TIME request = nil Request.transaction do re...