1
0
Fork 0
forked from OpenNeo/impress

Increase timeout on modeling

Okay so… I'm worried about this because of Rails whole single-threaded situation, which doesn't really let it handle blocking on external network requests very well.

Ultimately I think we're gonna have to do a clever thing but idk quite what?

I should look into whether like, puma + the new async stuff can enable Rails to be more tolerable about this, and handle a few requests at once, instead of having to have the Neopia server doing it. (Right now, the Neopia server isn't really doing its job quite right, because it depends on the Rails app being *local* to send stuff to it.)

But for now, let's just extend the timeout, cuz it's basically always getting hit in production—because there's currently no other way to do modeling, oops lol
This commit is contained in:
Emi Matchu 2023-10-12 22:08:24 -07:00
parent 966a0025e5
commit b885ff6ac0

View file

@ -14,7 +14,7 @@ class PetsController < ApplicationController
@pet = Pet.load( @pet = Pet.load(
params[:name], params[:name],
:item_scope => Item.includes(:translations), :item_scope => Item.includes(:translations),
:timeout => 1 :timeout => 2
) )
points = contribute(current_user, @pet) points = contribute(current_user, @pet)