You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sumo_store uses wpool:call/2 which defaults to a 5 second timeout and to work around this when queries can take longer than 5 seconds, substitution of for example sumo:find_by/5 to sumo:call/3 is needed which will use application:get_env(sumo_db, query_timeout) for the timeout value.
I suggest that sumo_store should be updated to use wpool:call/4 and get timeout (and worker strategy?) from configuration file with application:get_env(sumo_db, query_timeout)
The text was updated successfully, but these errors were encountered:
sumo:call can't be used to call any sumo function because the handle_call/3 in sumo_store for {call,...} applies DocName and State on to the Args before doing erlang:apply/3. This results in my example sumo_store_mysql:find_by(Conditions, SortFields, Limit, Offset, DocName, State) instead of sumo_store_mysql:find_by(DocName, Conditions, SortFields, Limit, Offset, State).
sumo:call/3 can only be used for custom functions (which it states), thought I would have thought that the custom function should follow the same structure of having DocName as first argument and State as last :)
sumo_store uses wpool:call/2 which defaults to a 5 second timeout and to work around this when queries can take longer than 5 seconds, substitution of for example sumo:find_by/5 to sumo:call/3 is needed which will use application:get_env(sumo_db, query_timeout) for the timeout value.
I suggest that sumo_store should be updated to use wpool:call/4 and get timeout (and worker strategy?) from configuration file with application:get_env(sumo_db, query_timeout)
The text was updated successfully, but these errors were encountered: