lib/spiderfw/model/storage/connection_pool.rb in spiderfw-0.6.30 vs lib/spiderfw/model/storage/connection_pool.rb in spiderfw-0.6.31

- old
+ new

@@ -98,15 +98,19 @@ if @free_connections.empty? # Spider.logger.debug("DB Pool (#{Thread.current}): no free connection") if @connections.length < @max_size create_new_connection else - Spider.logger.debug "#{Thread.current} WAITING FOR CONNECTION, #{@queue.count_waiters} IN QUEUE" + # metodo count_waiters non definito in ruby > 1.9.1 + #Spider.logger.debug "#{Thread.current} WAITING FOR CONNECTION, #{@queue.count_waiters} IN QUEUE" + Spider.logger.debug "#{Thread.current} WAITING FOR CONNECTION" unless @queue.wait(@timeout) clear_stale_connections create_new_connection if @free_connections.empty? && @connections.length < @max_size if @free_connections.empty? - Spider.logger.error "#{Thread.current} GOT TIRED WAITING, #{@queue.count_waiters} IN QUEUE" + # metodo count_waiters non definito in ruby > 1.9.1 + #Spider.logger.error "#{Thread.current} GOT TIRED WAITING, #{@queue.count_waiters} IN QUEUE" + Spider.logger.error "#{Thread.current} GOT TIRED WAITING" raise StorageException, "Unable to get a #{storage_type} connection in #{@timeout} seconds" if @timeout end end end else \ No newline at end of file