Increase pet loading timeout
This commit is contained in:
parent
76af587e7c
commit
44d9f98313
2 changed files with 4 additions and 2 deletions
|
@ -8,7 +8,6 @@ class PetsController < ApplicationController
|
|||
@pet = Pet.load(
|
||||
params[:name],
|
||||
:item_scope => Item.includes(:translations),
|
||||
:timeout => 1
|
||||
)
|
||||
points = contribute(current_user, @pet)
|
||||
|
||||
|
|
|
@ -44,7 +44,10 @@ class Pet < ApplicationRecord
|
|||
options[:item_scope])
|
||||
end
|
||||
|
||||
def fetch_viewer_data(timeout=4, locale=nil)
|
||||
# NOTE: Ideally pet requests shouldn't take this long, but Neopets can be
|
||||
# slow sometimes! Since we're on the Falcon server, long timeouts shouldn't
|
||||
# slow down the rest of the request queue, like it used to be in the past.
|
||||
def fetch_viewer_data(timeout=10, locale=nil)
|
||||
locale ||= I18n.default_locale
|
||||
begin
|
||||
neopets_language_code = I18n.compatible_neopets_language_code_for(locale)
|
||||
|
|
Loading…
Reference in a new issue