multithreading - How to run Rails multi-threaded in development? -
i working on multiple projects talk each other , i've run issue app
- a calls b (
request 1
, still running) - b calls (
request 2
) - based on
request 2
's result, b responds request 1
this requires me running multi-threaded rails in development mode.
i know can set using puma or ... isn't there simpler way?
i avoid changing in project (adding gems, config files..).
something rails s --multi
nice, can't webrick
run multiple threads or spawn more processes?
can perhaps install standalone gem need , run thin run . -p 3
?
you can configure app multi-threaded un-commenting following line production.rb:
# config.threadsafe!
if run rails_env=production bundle exec rails server
you'll start in production mode multi-threading. you'll have cross puma bridge either way, though, if , when deploy production server.
Comments
Post a Comment