before_filter :authorize_web
before_filter :set_locale
before_filter { |c| c.check_database_readable(true) }
- around_filter :timeout, :except => [:start]
+ around_filter :web_timeout, :except => [:start]
def start
end
rescue ActiveRecord::RecordNotFound
render :action => "not_found", :status => :not_found
end
-
-private
-
- def timeout
- SystemTimer.timeout_after(30) do
- yield
- end
- rescue ActionView::TemplateError => ex
- if ex.original_exception.is_a?(Timeout::Error)
- render :action => "timeout", :status => :request_timeout
- else
- raise
- end
- rescue Timeout::Error
- render :action => "timeout", :status => :request_timeout
- end
end