mirror of
https://github.com/openstreetmap/openstreetmap-website.git
synced 2025-08-16 17:07:06 +00:00
Attempt to make timeouts work properly
This commit is contained in:
@ -177,7 +177,7 @@ class ApiController < ApplicationController
|
||||
##
|
||||
# wrap an api call in a timeout
|
||||
def api_call_timeout(&block)
|
||||
Timeout.timeout(Settings.api_timeout, Timeout::Error, &block)
|
||||
Timeout.timeout(Settings.api_timeout, &block)
|
||||
rescue ActionView::Template::Error => e
|
||||
e = e.cause
|
||||
|
||||
|
@ -199,7 +199,7 @@ class ApplicationController < ActionController::Base
|
||||
##
|
||||
# wrap a web page in a timeout
|
||||
def web_timeout(&block)
|
||||
Timeout.timeout(Settings.web_timeout, Timeout::Error, &block)
|
||||
Timeout.timeout(Settings.web_timeout, &block)
|
||||
rescue ActionView::Template::Error => e
|
||||
e = e.cause
|
||||
|
||||
|
Reference in New Issue
Block a user