]> git.openstreetmap.org Git - rails.git/blob - config/initializers/abstract_adapter.rb
Remove last traces of OPNVKarte layer
[rails.git] / config / initializers / abstract_adapter.rb
1 if defined?(ActiveRecord::ConnectionAdaptors::AbstractAdapter)
2   module OpenStreetMap
3     module AbstractAdapter
4       module PropagateTimeouts
5         def translate_exception_class(e, sql)
6           if e.is_a?(Timeout::Error) || e.is_a?(OSM::APITimeoutError)
7             e
8           else
9             super
10           end
11         end
12       end
13     end
14   end
15
16   ActiveRecord::ConnectionAdaptors::AbstractAdapter.prepend(OpenStreetMap::AbstractAdapter::PropagateTimeouts)
17 end